optimize_fts() runs the same per-index loop as rebuild_fts() and had the
same OperationalError-only arm. SQLITE_CORRUPT surfaces as
sqlite3.DatabaseError (a sibling, not a subclass), so one corrupt index
aborted the loop and skipped optimizing the healthy sibling indexes;
vacuum() then swallowed the escaped error and reported 0. Widen the arm
to DatabaseError (OperationalError is its subclass, so the existing
behaviour is unchanged) to close the whole class.
Extend the salvaged test with an optimize_fts parametrize row (red
without this change) and fix the 'is_caused' -> 'is_caught' typo in the
test name.
Refs #133375
Co-authored-by: liuhao1024 <sunsky.lau@gmail.com>