[refactor] [net] Clean up InactivityCheck()
Summary:
This is a pure refactor and should not change any behavior. It clarifies and documents the InactivityCheck() function This makes #20721 easier to review. In particular, this function uses a mixture of (unmockable) system time and mockable time. It's important to understand where those are being used when reviewing #20721.
Backport of core#20927.
Ref T1696.
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Maniphest Tasks: T1696
Differential Revision: https://reviews.bitcoinabc.org/D10874