Moved protocol in the JS client onto the connection

- Also added ProtocolResolverFacts test case to test bad client protocol