Make median() always return a Float

This ensures type stability and is consistent with quantile().
Fixes #7331.
These tests do not actually verify type stability (because ``2 == 2.``).  All these tests passed even without the update.