add support for detecting dialects

Localize the determination of database dialect to QDjangoDatabase.
QDjango currently assumes the use of native SQL drivers, and
therefore uses QSqlDatabase::driverName() directly throughout the
codebase. With current testing using ODBC drivers the driverName
is no longer sufficient for determining database dialect, so
this introduces a private method allowing to determine dialect
based on more complex criteria.