pep8
Content server: Fix blank username causing error on startup

Fixes #1215893 [attempted to start server and recieved an error](https://bugs.launchpad.net/calibre/+bug/1215893)
newdb: Fix dump and restore on non-ascii locales

Fix a bug in the new backend that broke the Check Library function on computers
with non-English locales. Fixes #1215819 [version 1.0 vérification de la bibliothèque](https://bugs.launchpad.net/calibre/+bug/1215819)

Upstream bug: https://code.google.com/p/apsw/issues/detail?id=142
Merge branch 'kovidgoyal/master'