re-implemented TypeAdapter using factory pattern

Default abstract implementation for TypeAdapter supports sqlite, pgsql and dblib. There is also a Mysql implementation, with all the mysql-specific stuff. During runtime, the right class will be instantiated and used, without the need for the switch statements.