ENH: add `environment`, e.g. "longtable", to `Styler.to_latex`
checks an item off #41649 

closes #37443 

adds the longtable template, similar to DataFrame.to_latex.

also allows for a custom environment if \begin{table} should be replaced by \begin{figure} etc.

can you rebase this @jreback rebased and updated. @jreback can this be merged as is? I've addressed almost all comments, with the one subjective suggestion ignored due to preference.

@ivanovmg thanks for review - I think after the iterations the tests are better and clearer.