Fix visibility of classes

The factories need to be public, so that users can explicitly mandate a
particular socket type.

Also, the `ManagedSocket` and `ManagedContext` classes should probably
not be accessible.