Enhance USES=uniquefiles to be more generic.
This allows to have more complex renaming schemes. Until now, it could
only add a prefix or a suffix, but this was not working at all for man
pages, because it would give man/man1/pyfoo.1.gz-2.7 or
man/man1/pyfoo-1-2.7.gz. With this change, a man page will be correctly
renamed to man/man1/pyfoo-2.7.1.gz.
Unfix ports that were already handling man pages.
Submitted by: Fukang Chen (previous patch)
Exp-run by: antoine
Sponsored by: Absolight
Differential Revision: https://reviews.freebsd.org/D13444