Add GUARDED_BY(cs_wallet) annotation to m_last_block_processed, given
that its now guarded by cs_wallet instead of cs_main
https://github.com/bitcoin/bitcoin/pull/15842/commits/422677963a7b41e340b911b4cd53d29dd8d63f21
Add WITH_LOCK macro: run code while locking a mutex
Results from ryanofksy suggestion on isPotentialTip/
waitForNotifications refactoring
https://github.com/bitcoin/bitcoin/pull/15842/commits/edfe9438ca54274815f076fc21beb790df5aa0a2
Depends on D6258
Backport of Core PR15842