Performance improvements to isotonic regression.

It's not guaranteed that either `y` or `weight` is contiguous.