Re-introduce check for address validity before acquiring wallet lock

Reverted changes to test for whether an address is a change address, as while the change removed a constant overhead, that overhead was used as a pre-condition of acquiring the wallet semaphore. This gives us a parellisable load increase, with the aim of reducing number of times the semaphore on the wallet is acquired.

The original changes are from https://github.com/dogecoin/dogecoin/commit/d0640f940d7294596664c7d1d78d5f9560edff25