ENH Generalize regmax/regmin to non-integers

There is no reason to restrict it to integers. The problem and code are
well-defined for any ordered type.

This was requested and discussed as issue #47 on github (not closing as
that issue also refers to watershed).