Add arg-sample code

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

You probably want to use
```c++
double compute_mean(const vector<double> &scores) {
```

since scores are not altered by this function and the reference operator `&` prevents the scores from being copied when being passed into this function.