Enforce the correct address when opening a wallet

When opening a wallet, make sure the secret generates the correct address, then sync the wallet with the correct address if necessary.

This should resolve send failures (#576) caused by corrupted wallets that have the correct secret, but the wrong address.