try to fallback to pysqlite2.dbapi2 as sqlite3

for situations where Python is built without sqlite3 and
can not easily be changed, it would be nice to still be
able to get history with pysqlite2.
Merge pull request #2718 from skyl/patch-1

try to fallback to pysqlite2.dbapi2 as sqlite3 in core.history