libc: add min/max macros

These macros are the same as in gnu libc
and bsd's sys/sys/param.h