p2p: Avoid InitError when downgrading peers.dat
Summary:
When downgrading, a peers.dat with a future version that has a minimum required version larger than the downgraded version would cause an InitError. This commit changes this behavior to overwrite the existing peers.dat with a new empty one, while creating a backup in peers.dat.bak.
Backport of core#24201.
This can't be used with the recent v4 format update but will make for a better UX if the peers.dat format is changed in the future.
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D12348