add efficient mean and median for ranges

These are useful (see e.g. shashi/Interact.jl#9) and there is no reason for them not to be fast.  I actually didn't realize that they were missing.