Closes #356

Refactor DbDriver and SqlDialect to make them simple to extend and make
them public