Do not restart api server when a new server certifiate is made, simply replace the cert
A little cleanup
Use tomb for cert changed listener
Fix test
Close cert changed channel when cert update workr exits
Fix cert update channel deadlock
Use pointer for listener
Merge pull request #1346 from wallyworld/prevent-apiserver-restart

Do not restart api server when a new server certifiate is made, simply replace the cert

When machine addresses are updated, a new server certificate is made so that connections over those addresses can be made securely. Instead of restarting the API server to use the new certificate, the net listener is modified to replace the current certificate with the new one without stopping and starting the server. While the certificate is being updated, new connections to the server are disallowed.

(Review request: http://reviews.vapour.ws/r/667/)