Based on #9725. Also bonus of getting two extra static declarations in.
This removes another callback from block connection logic, making it easier to reason about the wallet-RPCs-returns-stale-info issue.
Note that this does a full mapWallet loop after the first block which is connected after restart. This is due to a previous bug where a coinbase transaction from the current best tip which existed in wallet immediately prior to restart would not be shown in the GUI except because on-load -checkblocks would call DisconnectBlock and ConnectBlock on the current tip. To avoid making it worse (ie that such transactions would never be displayed until restart), a scan to find such transactions was added.