Implemented nonblocking and blocking connections more cleanly. Both
threadsafe and non-threadsafe classes now inherit from an abstract
interface class. While threadsafe classes are still implemented on top
of non-threadsafe classes, relationship has been changed to 'has-a'
instead of 'is-a'.