Add tests and fixes for "PRAGMA ota_mode".
Fix an unintialized variable problem in sqlite3ota.c.