fix endpoint validation check
fix endpoint validation check

If endpoint is not an url, validation is done for a hostname, IPv4 or
IPv6 address

balamurugana/minio-java,vadmeste/minio-java,minio/minio-java