Add partial_min/max to libcore/cmp

Intended to prevent each user to write his own partial_min/max, possibly differing in slight details. @sfackler encouraged to PR this on IRC.

(Let's hope this works... First PR.)
Could you explicitly match `None` here and return just `None` as well? (the `::option::` shouldn't be necessary)