Regenerate state server certificate to update SAN attribute with machine IP addresses
Addresses are added to certificate, and consistency checks required when saving
No need to store sevrer cert in state - it is generated on each state server
Turns out we need to store initial state server cert in state so HA works
Drop an error condition unrelated to mongo.
Add a note about what io.EOF means.
Drop "connection is shut down" as well.
Drop the two related tests.
Convert funcs to vars for monkey patching
Actions :: Enhance TestFindActionTagsByPrefix
Move tests to state package, address reviewer feedback
Not ready to expose nowToTheSecond yet; document and make private again
group all vars, consts, and types together
remove one word comments
Factor out checkConnectionFailure.
Check for various errnos.
Merge pull request #1227 from johnweldon/0-action-testing

Follow up enhanced tests for Actions API

Actions API :: `FindActionTagsByPrefix()` now has enhanced tests that monkey patch the `utils.NewUUID()` call so that we can specify a common prefix for multiple new UUID's, and then test that our API call works.

(Review request: http://reviews.vapour.ws/r/537/)
Merge pull request #1276 from ericsnowcurrently/replicaset-IsReady-drop-condition

Drop an error condition unrelated to mongo.

The motivating error actually came from the API client, not mongo.  So leaving the check in might lead a future reader to erroneously believe mongo might produce such an error (or that isConnectionNotAvailable should handle it).

(Review request: http://reviews.vapour.ws/r/591/)
Merge pull request #1241 from wallyworld/update-server-certificate

Regenerate state server certificate to update SAN attribute with machine IP addresses

Fixes: https://bugs.launchpad.net/juju-core/+bug/1397909

A new worker listens to address changes of the state server and regenerates the state server certificate to add the addresses to the SAN list. Then the apiserver is restarted to use the new certificate.

To make this possible, the CA cert private key needs to be available.It is discarded at the moment during cloud init. So now it is included in the StateServingInfo and written to agent conf along with other secrets.

Older juju deployments which are upgraded will not have the CA cert private key available, so the state server certificate cannot be regenerated. An upgrade step will need to be written to create a new CA cert for the environment and ensure the private key is recorded.

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