ISPN-3608 Parse server based on whether client uses IPv4 or IPv6

* For IPv4, continue using the `host:port` format.
* For IPv6, use `host[port]` format.
* Copied JGroups logic used to detect IPv4 vs IPv6 addresses.

Once solution is agreed, I'll add documentation.