Get time less often in AddrManImpl::ResolveCollisions_()
Summary:
This makes the code less verbose. Also, future changes that change how
to get the time are less verbose.
Moreover, GetAdjustedTime() might arbitrarily change the value during
the execution of this function. For example, the system time advances
over a second boundary, or the network adjusts the time arbitrarily.
Most of the time however the value will not change, so it seems better
to always lock the value in this scope for clarity.
This is a backport of core#25224
Depends on D15089
Note that the work was already partially done in the initial backport adding this function (D1862, see review), and we get the time even less often by calling GetAdjustedTime outside of the for loop.
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D15090