Fix regression in max/min

In 1.6.0 and earlier `max` and `min` returned negative and positive infinity respectively. Currently it throws an exception if no iterator is provided, otherwise returns an infinity.

I think I prefer the exception but returning +-Infinity is fine too.