avoid throwing and emit errors instead (except for two usage asserts), including a refactor of connect routine to support emitting socket open errors. updates #262 (will need to confirm event propagation through HTTP module)