Refactor condition into permission check function
Refactor condition into permission check function

papi.c - refactor condition into function to check for uid/gid matching root
         remove a few more unused snippets

andyvand/cygpcpfans,prasincs/pcp,mbaldessari/pcp,tjanez/pcp,mbaldessari/pcp,prasincs/pcp,aeg-aeg/pcpfans,edwardt/pcp,andyvand/cygpcpfans,aeg-aeg/pcpfans,adfernandes/pcp,edwardt/pcp,prasincs/pcp,adfernandes/pcp,prasincs/pcp,wuliming/pcp,andyvand/cygpcpfans,wuliming/pcp,edwardt/pcp,edwardt/pcp,prasincs/pcp,edwardt/pcp,andyvand/cygpcpfans,tjanez/pcp,mbaldessari/pcp,mbaldessari/pcp,wuliming/pcp,tjanez/pcp,adfernandes/pcp,wuliming/pcp,tjanez/pcp,prasincs/pcp,andyvand/cygpcpfans,adfernandes/pcp,prasincs/pcp,aeg-aeg/pcpfans,andyvand/cygpcpfans,wuliming/pcp,adfernandes/pcp,tjanez/pcp,adfernandes/pcp,adfernandes/pcp,wuliming/pcp,edwardt/pcp,tjanez/pcp,aeg-aeg/pcpfans,aeg-aeg/pcpfans,andyvand/cygpcpfans,aeg-aeg/pcpfans,aeg-aeg/pcpfans,wuliming/pcp,tjanez/pcp,edwardt/pcp,tjanez/pcp,andyvand/cygpcpfans,aeg-aeg/pcpfans,wuliming/pcp,mbaldessari/pcp,adfernandes/pcp,prasincs/pcp,edwardt/pcp,mbaldessari/pcp