REF: handling of max_colwidth parameter
- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

this would be a precursor to fixes for #7059, #9784 and #6491.

getting the display.max_colwidth value is moved from `_make_fixed_width` to `format_array` to be consistent with the handling of the `column_space`, `float_format` and `precision` display options.

the PR also includes refactoring of the prior fix to `to_html` #24841

`_format_col` is moved from `DataFrameFormatter` to `TableFormatter` to make it available to `HTMLFormatter` and `NotebookFormatter`.

at the moment `_make_fixed_width` is called by `format_array`, but also by `_to_str_columns` and `_get_formatted_index`.

`_to_str_columns` is not an issue because the calls are preceded to calls to `format_array`

IMO `_get_formatted_index` needs to be refactored to call `format_array` directly and probably some additional tests as a precursor to this PR.

thoughts?

cc @TomAugspurger 
can you merge master and update @simonjayhawkins can you rebase and update when possible @simonjayhawkins whats the status of this? > @simonjayhawkins whats the status of this?

still need to do a precursor. checks were passing and i don't think they should have been. so holding as draft unless you'd rather it be closed for now.

> @simonjayhawkins can you rebase and update when possible

comments addressed.

> looks good, can you add a whatsnew note

this should be a pure refactor. no whatsnew needed?

 @simonjayhawkins is this still active? can close for now.