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.
in %edit, don't save "last_call" unless last call succeeded

avoids failing calls to `%edit` from killing future `%edit -p`

closes #2466
Merge pull request #2816 from minrk/edit_last_cell

in %edit, don't save "last_call" unless last call succeeded
Merge pull request #2718 from skyl/patch-1

try to fallback to pysqlite2.dbapi2 as sqlite3 in core.history
avoid comparison error in dictdb hub history

in rare situations, display data can arrive at the Hub before the execution request, in which case `submitted` is undefined.

should address #2821, but I need to see Jenkins succeed,
since that is the only place this comes up.
BUG: Opening parenthesis after non-callable raises ValueError

Typing something like `None(` raises a value error.
Merge pull request #2830 from punchagan/fix-format-tooltip

BUG: Opening parenthesis after non-callable raises ValueError
Merge pull request #2829 from minrk/nodate

avoid comparison error in dictdb hub history

in rare situations, display data can arrive at the Hub before the execution
request, in which case `submitted` is undefined.

should address #2821, but I need to see Jenkins succeed, since that is the
only place this comes up.
Fix SyntaxError