ganeti-masterd: Remove PID file at the end
ganeti-masterd: Remove PID file at the end

Removing the PID file should be the last thing done. This patch makes
sure it's also removed when master.server_cleanup() throws an exception.

Also initialize logging only after writing the PID file.

Reviewed-by: iustinp


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