Fixes #31447.
During migration failure, only load wallet back into memory when the wallet was loaded prior to migration. This fixes the case where BDB is not supported, which implies that no legacy wallet can be loaded into memory due to the lack of db writing functionality.
Link to error description #31447 (comment).
This PR also improves migration backup related comments to better document the current workflow.