Rename min/max to minimum/maximum when they are for reduction

There remain several places that use min/max for reduction. This patch fixes them.