Gateway: GatewayService should register cluster state listener before checking for current state

At the moment we may miss a state change and fail to recover on time.


Exposed by build failure: http://build-us-00.elasticsearch.org/job/es_core_1x_suse/53/testReport/junit/org.elasticsearch.cluster/NoMasterNodeTests/testNoMasterActions_writeMasterBlock/