[BUGFIX] Create PID file before daemonizing

The short gap between the parent process exiting and the PID file being written occasionally led to monitoring processes such as god believing that the server had failed to launch. Multiple instances would then be started with dire consequences. Advice needed for tests.
[BUGFIX] Failing tests due to mocking too high
[CS] Whitespace
[BUGFIX] Tests were trying to daemonize incorrectly
[CS] Log pidfile creation whenever it happens
Merge branch 'refs/heads/bugfix/pidfile_before_daemonizing' into develop