Fix handling of invalid headers
Summary:
We only disconnect outbound peers (excluding HB compact block peers and manual
connections) when receiving a CACHED_INVALID header.
This is a partial backport of Core PR15141 : https://github.com/bitcoin/bitcoin/pull/15141/commits/6b34bc6b6f54f85537494cbea3846d5d195a06d9
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, jasonbcox
Reviewed By: #bitcoin_abc, jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D6727