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

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.