CLN: Removed Unnecessary Conditionals in groupby_helper
- [X] closes #19724 
- [X] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

ASV results are pretty inconsistent but I couldn't find anything directly related from this change. Of the marks below, only `max` was touched by this change, and that doesn't appear consistently in the results

```bash
       before           after         ratio
     [2fdf1e25]       [458210c1]
+         155±1μs          173±4μs     1.12  groupby.GroupByMethods.time_method('float', 'max')
+         324±1μs          361±5μs     1.12  groupby.GroupByMethods.time_method('float', 'median')
-         722±5μs          638±8μs     0.88  groupby.GroupByMethods.time_method('int', 'cumprod')
-        540±10μs          463±1μs     0.86  groupby.GroupByMethods.time_method('int', 'cummax')
-        551±20μs          459±1μs     0.83  groupby.GroupByMethods.time_method('int', 'cummin')
-      1.17±0.1ms          475±7μs     0.40  groupby.GroupByMethods.time_method('float', 'sem')
```
Same Travis failures we've been having recently - appear unrelated to change thanks @WillAyd even if this were slower it reduces code complexity which is good.