Added weighted median function and tests

AFAICT `sortrows` is going to sort on both columns, right? Couldn't you sort only on the first column? I think you may save some memory by first saving `[v w.values]` in an object, and then calling `sort!` on it.