STY: adapted code to `C_STYLE_GUIDE.rst.txt`.
MAINT: rewrote `check_array_monotonic` to use array indices, not pointers.
TST: tests for proper handling of bins with all items almost equal now check
     the return value for correctness, not just that an error is not raised.