CLN: Unify Window._apply_window and Rolling._apply functions
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

`roll_window` function is split into two to enable implementing other weighted functions e.g. var, std (ref #26597)

@jreback ok kept original function unchanged while calling it in separate functions. need to pass str functions in `_apply_window` also. `_apply` doesn't implement weights in the spirit of #27409, any objections to renaming to `roll_weighted_window_foo` or some such? it's confusing having `Window`, `Rolling` and `roll_window`, where the latter two can both do ops like sum/mean. In favour of renaming it to `window_foo` or `weighted_roll_foo` It seems some network tests have failed Would this be a good opportunity to include a fix for issue #26462 ? Currently it looks like the `win_type` parameter is ignored in a `df.goupby(...).rolling(..., win_type=xyz)` aggregation @ihsansecer pls merge master and update when you can, ping on green. > Would this be a good opportunity to include a fix for issue #26462 ? Currently it looks like the `win_type` parameter is ignored in a `df.goupby(...).rolling(..., win_type=xyz)` aggregation

@Connossor we try to keep 1 PR to 1 thing; this is a refactor only.