Tests for the sqlite module.

Also includes some missing tests from escape. They are mostly
pointless but at least exercise the code.