QueryBasicTest. Wait for cluster safe state before running the query

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