Refactor Quantile to avoid bug.

There was a bug in quantile causing it to return some percentiles that
were below the min value. This simplifies quantile and adds some sanity
tests to ensure we don't get this behaviour.
Merge pull request #24 from pellucidanalytics/fix/quantile

Refactor Quantile to avoid bug.