max/min -> maxof/minof

Implements the renaming of the binary max/min functions to `maxof` and `minof` as discussed in #2265. Now, if `max` or `min` are given a second argument, it is interpreted as the dimension or region over which to take the max or min.

Bye, `max(a, (), 1)`!

**Note**: this required updates in *a lot* of files. It passes all tests on my machine, but additional testing might be wise before merging.