Check that security index is green before upating built-in passwords
Check that security index is green before upating built-in passwords

This commit updates the built-in password setting process
to check that the security index is green before proceeding.
Due to concurrent password updating from each node, it is possible
for the security index to not be ready when attempting to
update passwords, leading to a response of

{
  "error": {
    "root_cause": [{
      "type": "status_exception",
      "reason": "Cluster state has not been recovered yet, cannot write to the [null] index"
    }],
    "type": "status_exception",
    "reason": "Cluster state has not been recovered yet, cannot write to the [null] index"
  },
  "status": 503
}

elastic/azure-marketplace,elastic/azure-marketplace