[MRG] COSMIT: Use searchsorted in weighted_percentile

I'm sure this does not change speed or anything, but it definitely looks better.