Add calculation of arbitrary empirical quantiles

For those users who are not satisfied by the already present `quartiles` function.

I did not make `quartiles` use the new `quantiles` function internally: this is because `quantiles` cannot reproduce the estimation method used by `quartiles` at the moment, and so all existing tests would break. Happy to change the tests though if that's what we want!