switch: bind the listening socket before daemonizing

Otherwise clients which start immediately after us will fail
intermittently with ECONNREFUSED trying to contact us.

Fixes #5

Signed-off-by: David Scott <dave.scott@eu.citrix.com>