SERVER-8030 Validate connection string in JavaScript connect() function

Validate that the "URL" passed to the connect() function matches one of the
accepted formats (host:port/database, host/database or database) before trying
to use it to connect to a server.  Change a uassert in HostAndPort::init() to
an massert to match the massert four lines above it.  Add jstest for connect()
validation.
SERVER-8030 Add IPv6 version of jstest