add support for detecting dialects

This may originally seem like a superfluous change, however I'm
currently testing with ODBC drivers, and the driverName() of the
database is no longer sufficient for determining differences in
database dialects throughout the codebase. This change allows for
injecting logic to determine the dialect in the event the user
is not using a native driver.