first sort by manual section (1, 8, 6, 2, 3, ...),
then by manual tree (share, X11R6, local)
and only for ties prefer cat over man.
For example, this avoids that /usr/local/man/cat7/roff.0
overrides /usr/share/man/man7/roff.7.
Triggered by a question from Jan Stary <hans at stare dot cz>,
ok dcoppa@ bentley@ jca@ pascal@.