Switch writing of PID file to new reporting style
Switch writing of PID file to new reporting style

Currently, the writing of the PID file uses a "standard" error
reporting: catch exception, transform it into a 'Result' type, leave
handling of that to the caller. However, for daemon startup, we
actually want exceptions to be propagated up until the handler which
will write the details to the pipe.

This patch removes the writePidFile wrapper (and stops exporting it),
and changes the code to simply annotate better the I/O error.

Signed-off-by: Iustin Pop <acf83a5274f31a43af6b914614365999469c1a31@google.com>
Reviewed-by: Michael Hanselmann <68b67885ff74281219b4a4be33cc20fd45078d7c@google.com>

leshchevds/ganeti,onponomarev/ganeti,ganeti-github-testing/ganeti-test-1,ganeti/ganeti,ganeti/ganeti,leshchevds/ganeti,yiannist/ganeti,yiannist/ganeti,apyrgio/ganeti,apyrgio/snf-ganeti,andir/ganeti,mbakke/ganeti,andir/ganeti,grnet/snf-ganeti,dimara/ganeti,mbakke/ganeti,bitemyapp/ganeti,mbakke/ganeti,dimara/ganeti,onponomarev/ganeti,andir/ganeti,yiannist/ganeti,bitemyapp/ganeti,ganeti-github-testing/ganeti-test-1,apyrgio/snf-ganeti,ganeti/ganeti,grnet/snf-ganeti,leshchevds/ganeti,apyrgio/ganeti