Use gnulib MIN/MAX

... instead of littering definitions and custom min/max functions
everywhere.