Waiting for environment ready after deploy.

- Added polling for making sure the staging environment has been updated
  successfully and is now ready before activating it.