Implementation of proposal in #14396.
This introduces CWallet::IsChange(CScript&) method and replaces original CWallet::IsChange(CTxOut&) method with overloaded version that delegates to the new method with txout’s scriptPubKey. In this way TODO note from the original method can still be addressed in a single place.