Allow the passing of a context to `connect` and `listen`.
Especially useful when working with threads that should share the same context.
Fix deprecation and case issue to be compatible with nim 0.10