sqlite3_finalize() returns the last *evaluation* result of the prepared
statement (e.g. SQLITE_CONSTRAINT if the last step failed), not a status
indicating whether finalization itself succeeded. Finalization always
succeeds and frees the statement; the return value is informational only.
Also fix the finalize loop in internalClose(): after finalizing a
statement, SQLite removes it from its internal linked list, so the next
call must restart from nullptr rather than from the now-dangling pointer.
Differential Revision: https://phabricator.services.mozilla.com/D299528