PERF: perf improvements for Series.transform (revised) (GH6496)
xref #6496

Additional perf improvements for Series.transform (when specifying cythonizable functions)

```
-------------------------------------------------------------------------------
Test name                                    | head[ms] | base[ms] |  ratio   |
-------------------------------------------------------------------------------
groupby_transform_series2                    |  98.7293 | 3621.1437 |   0.0273 |
groupby_transform2                           |  19.5080 | 168.8046 |   0.1156 |
```
