This function calculates the given quantiles over the rows of an
integer matrix. It uses method 8 of the stat::quantiles() function. It gives
the same result, to numerical accuracy, and is designed to handle matrix input.
It is only designed to work on integer matrices!