simplify the runtime Register reconnect logic

Refactor the Register code a little bit to make it easier to comprehend.
Merge pull request #2750 from jpoimboe/simplify-register-reconnect

Simplify the runtime Register reconnect logic
don't import emport empty hostconfig
Merge pull request #2777 from dotcloud/fix_port_stop_start

don't import emport empty hostconfig