Connect behavior seems broken with IOCP
Finally got IOCP to the point where I can turn it on, and I get a bunch of "Socket is not connected [WSAENOTCONN]". These seem to happen when connection_or_connect() calls connection_watch_events(), which calls bufferevent_enable(), which calls bev_async_consider_reading(), which fails because the connection isn't connected yet.
There's a workaround here: in the aync bufferevent case, don't call watch_events() until we're connected But perhaps also we should consider this a libevent bug: be_async_consider_{reading,writing}() and be_async_enable() should maybe return immediately if the bufferevent is in the process of connecting.
Also, Tor should eventually switch to use bufferevent_socket_connect().