Close connections to hub before daemonizing.

This is to handle keep-alive for XML-RPC connections
in lab controller daemons in Fedora (18+)/Python 2.7.

Bug: 977269
Change-Id: Ic5aa21386b2c3f986d2602a27ed32614bbce0d3b
Merge "Close connections to hub before daemonizing." into develop