Added a DBConnector class

This was a class I wrote few weeks back, when I was trying to create a
DBConnectionFactory. Most of the code in the class has been gleaned from
various sources on the internet.