qa/870: try to fix a race and false negative test
qa/870: try to fix a race and false negative test

When checking for existence of pmloggers and there state/control/socket
files, there is an ugly race between doing a ps to get pid and testing
for the associated files all in the presence of a possible attempt
to start/restart pmlogger by cron or systemd.

These changes reduce the size of (but unfortunately do not eliminate)
the race time window.

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