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 