ISPN-2781 NPE in AbstractTopologyAwareEncoder1x

Please merge `t_2781_52` into `5.2.x` as well.

https://issues.jboss.org/browse/ISPN-2781

Copy the address cache into a regular map before generating the
topology response, to protect from changes from other threads.

Send topology responses even if not all CH members are in the
address cache. This allows the client to remove leaving HotRod
servers from its CH.

Also ISPN-2746 testDistributedPutWithTopologyChanges test randomly fails on all environments
https://issues.jboss.org/browse/ISPN-2746

The test wasn't properly waiting for the rebalance to end on the
servers before checking the topology id.