REF: split out grouped masked cummin/max algo
No user-facing change here, but I think makes logic clearer and future changes easier to understand

Benchmarks look unaffected:
<details>

```
before           after         ratio
[3f67dc33]       [51f8f9c8]
<master>         <masked_cummin_ref>
17.0±2ms         16.3±2ms     0.96  groupby.CumminMax.time_frame_transform('Float64', 'cummax')
17.7±2ms         18.4±2ms     1.04  groupby.CumminMax.time_frame_transform('Float64', 'cummin')
20.8±3ms       16.9±0.3ms    ~0.81  groupby.CumminMax.time_frame_transform('Int64', 'cummax')
20.7±3ms         18.2±3ms    ~0.88  groupby.CumminMax.time_frame_transform('Int64', 'cummin')
15.7±2ms       13.0±0.3ms    ~0.83  groupby.CumminMax.time_frame_transform('float64', 'cummax')
15.5±0.7ms       13.6±0.7ms    ~0.88  groupby.CumminMax.time_frame_transform('float64', 'cummin')
29.8±0.7ms       28.0±0.4ms     0.94  groupby.CumminMax.time_frame_transform('int64', 'cummax')
29.9±1ms         30.0±2ms     1.00  groupby.CumminMax.time_frame_transform('int64', 'cummin')
19.2±2ms         16.9±3ms    ~0.88  groupby.CumminMax.time_frame_transform_many_nulls('Float64', 'cummax')
22.6±2ms         15.6±2ms    ~0.69  groupby.CumminMax.time_frame_transform_many_nulls('Float64', 'cummin')
15.7±3ms         19.3±3ms    ~1.23  groupby.CumminMax.time_frame_transform_many_nulls('Int64', 'cummax')
19.5±2ms         14.7±1ms    ~0.75  groupby.CumminMax.time_frame_transform_many_nulls('Int64', 'cummin')
14.5±2ms       11.4±0.8ms    ~0.79  groupby.CumminMax.time_frame_transform_many_nulls('float64', 'cummax')
13.2±1ms       12.4±0.2ms     0.94  groupby.CumminMax.time_frame_transform_many_nulls('float64', 'cummin')
14.2±1ms       13.1±0.1ms     0.92  groupby.CumminMax.time_frame_transform_many_nulls('int64', 'cummax')
14.1±0.5ms       13.4±0.4ms     0.95  groupby.CumminMax.time_frame_transform_many_nulls('int64', 'cummin')
```

</details>
