pmrep: minor code cleanups
pmrep: minor code cleanups

Sanitize some copypasted config validation code.
Some minor code reorganization for better readability.
Other minor tweaks. No functional changes.

adfernandes/pcp,adfernandes/pcp,adfernandes/pcp,adfernandes/pcp,adfernandes/pcp,adfernandes/pcp,adfernandes/pcp,adfernandes/pcp