QueryBasicTest. Wait for cluster safe state before running the query

Issue https://github.com/hazelcast/hazelcast/issues/4200