Fixes #36483
As described in the linked issue, migration to descriptor wallets currently fails for legacy wallets that contain no spendable keys and are tracking watch-only transactions.
When a database transaction containing RemoveTxs() is aborted, the database rolls back and the registered on_abort callback is invoked. The current listener contains an empty std::function so calling it throws std::bad_function_call and masks the actual migration error.
The first commit changes the callback to a no-op function since no memory cleanup happens on abort. It also adds a unit test to confirm that abort restores the database record and leaves wallet memory unchanged.
After this commit, the functional test supplied by the issue's author reports Error: Not all transaction records were migrated (-4), exposing the migration error previously masked by the abort callback exception.
During wallet migration, RemoveTxs() defers deletion of transactions from the original wallet's in-memory mapWallet until after the database commit. The current check that requires an empty map before the database commit causes migration to fail.
The second commit checks that the transaction IDs left in the map exactly match those already scheduled to be removed in the txids_to_delete vector. If they match, migration continues and the on_commit callback removes those transactions from memory.
A new functional test is added to cover migration of a blank wallet with watch-only transactions. It checks that the destination watch-only wallet retains both transactions and balance, including after unloading and reloading the wallet, without rescanning the blockchain.