Add arg-sample code

@mjhubisz

This PR addresses issue #9 by merging the code needed for `arg-sample` into master.


If you change the type on `compute_quantiles`, make sure you change this too to use `const vector<double> &q`.