Added statistics benchmakr and refactored code.
Added quickselect routines.

These will be needed to compute the median.