If something in the daemon_start() function fails before server variable
is initialized, we get the following exception:
UnboundLocalError: local variable 'server' referenced before assignment
We should not attempt to close connections or kill all threads for a
daemon that failed to start (or that hasn't even reached the moment of
the start).
Closes-Bug: #1465350
Change-Id: I7769e40c13e3bd740d5b8a949a61d1bcc127f137