Return NaN for median of vectors containing NaN. Closes #6486
Merge pull request #6820 from JuliaLang/sjk/median_nan

Return NaN for median of vectors containing NaN. Closes #6486