fix container restart race condition

Finish container cleanup before setting the state to stopped.
Otherwise, for an application that exits quickly, a call to Restart
can allow Start to be called again before cleanup is done, resulting in
overritten data in the Container struct.
simplify the runtime Register reconnect logic

Refactor the Register code a little bit to make it easier to comprehend.
Merge pull request #2748 from jpoimboe/fix-restart-race-condition

fix container restart race condition
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
Pip python deps to a specific version
Offline Image Transfers #1155
Adding version info, switching to defer for cleanup
Adding spaces to fix docs build
Setting offline package version to 1.0
Fixing build
Adding content type to images/(name)/get
Adding 1.7 documentation
Fix error checks for offline transfer and remove unneeded debug output
Add typo in remove all. Ensure tmpDir is removed
Merge pull request #1974 from dotcloud/1155-offline-image-transfer

Implement offline image transfers
Merge pull request #2779 from crosbymichael/pin-python-deps

Pip python deps to a specific version