Added ConnectionManager class

I may be able to use any of the code I wrote last week that is more
higher level than this, but I am rewriting this class because of the
differences between our connection interfaces.