Catch errors filling readline history on startup.

Closes gh-2431
Merge pull request #3854 from takluyver/i2431

Catch errors filling readline history on startup

In some cases, the history db can be a valid SQLite database, but contain strings with null bytes, which readline refuses to accept. This catches and ignores the resulting error.

At present, it leaves the history database untouched, and keeps trying to load readline history: if just one entry is invalid, the rest of the history may still be useful to the user.

Closes #2431