Add test for CWalletTx::GetImmatureCredit() returning stale values.
Summary:
Add test for cached immature credit flag not being cleared in
CWalletTx::MarkDirty() bug, which was fixed in
https://github.com/bitcoin/bitcoin/pull/8717, commit a560378.
Bacport of core's PR9359
Test Plan:
make check
Reviewers: schancel, #bitcoin_abc, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Subscribers: jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D941