Make median() always return a Float

This ensures type stability and is consistent with quantile().
Fixes #7331.