Mom5 selection improvements

better tests of the median of median of 5 algorithm and removing an unnecessary comparison in a tight loop.