lib: make connection type configurable

It's now possible for the caller to create the socket/server object that
Uhura uses.  First step in making it possible to use SSL/TLS encryption.

Suggested reviewers: @themitchy @Qard

TODO: Update the README.  I'll do that if you guys think this is a decent approach.