PID and consistency fixes

- Switch to using pid_file and pid_dir to keep all our pids in the same
   location (rather than occasionally sending them to /var).  Apply the
   same to log locations.
 - The above change means flapper needs sudo to run
 - DRY nagios and nsca receiver code.
 - Give the same outputs for flapper, receiver and server, including
   the pid and uptime for a status.
 - Check that the flapper and receiver processes terminate correctly.