Make OffsetArray maximum! not as type unstable (#50447)
The change in #50429 moves around some dispatch boundaries and pushes
the allocations in the offsetarrays `maximum!` test over the limit. The
implementation of that code is massively type unstable. Somewhat,
ironically, the whole original point of that test was to test that the
implementation was not type-unstable (#28941), so actually opt our
OffsetArrays implementation into the interface that's supposed to
guarantee that.
If this PR is fine here, I'll submit the same upstream to avoid
diverging the implementations too much.
Co-authored-by: Jameson Nash <vtjnash@gmail.com>