fifo: use minmax.h instead of rolling its own min/max