Regenerate state server certificate to update SAN attribute with machine IP addresses
added support for setting metric credentials on the service

removed credentials from metric to metricBatch
Addresses are added to certificate, and consistency checks required when saving
renamed updatemetriccreds to set, added test, other review comments
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
Add WaitForReady function
Initial test
Test timeout
Reduce timeout in test
Test WaitUntilReady passes errors through
Switch to using WaitUntilReady for backups
Handle connection refused errors
Fix lp:1399229
Merge pull request #1272 from perrito666/fix_1399229

Fix lp:1399229



(Review request: http://reviews.vapour.ws/r/586/)
Minor test fixes
Merge branch 'master' into backup-replicaset
Test fix
Switch to majority check instead of all healthy check
Use a new client for the download call.