Connection cache

Optionally cache connections to a single host:port.
Preserves semantics of generating a connect event after connect is called even if the connection was already made.
@Raynos @dfellis