Fix segfault and data loss in pseudo_db
Fix segfault and data loss in pseudo_db

Don't call sqlite3_finalize() on the static sqlite3_stmt scan as
we reuse it later. The sqlite3_reset() and sqlite4_clear_bindings()
calls are sufficient to reset the prepared statement and reusing
the sqlite3_stmt that has had sqlite3_finalize() on it results in
segfaults and data loss.

Signed-off-by: Joshua Lock <9750fc34162235efa862f2505c1a01f735e97af7@intel.com>

incandescant/pseudo,estobbart/pseudo,estobbart/pseudo,incandescant/pseudo,estobbart/pseudo,incandescant/pseudo,incandescant/pseudo,estobbart/pseudo