Add partial_min/max to libcore/cmp