Added weighted median function and tests

```I'm still not sure that's the best solution. [v wt] is going to require copying the whole vectors, which may be really big, and then create another sorted copy. It may be better to call s = sortperm(v), and instead of sorting [v wt] iterate over s in the loop below, accessing wt[s[below_midpoint_index]]. This may be slower, not sure, but it may be much better for very large vectors (which is where performance matters for such a function).```

Good call on using `sortperm`.  I updated the gist to include a `sortperm` implementation:

https://gist.github.com/tensorjack/432bdbaa2aff38ee64ee

It's 25x faster than the old version, and also decreases memory use by 89%.  Going to send over a pull request with the new, improved version :)