Completes backport of core [[https://github.com/bitcoin/bitcoin/pull/15773 | PR15773]]. The remaining 2 commits cannot be
separated as it would cause flake8 to trigger failures.
Commit scripted-diff: use self.sync_* methods:
https://github.com/bitcoin/bitcoin/pull/15773/commits/fa16a09215f6cce23de0f90d51b3c5df37c6b6a4
```
-BEGIN VERIFY SCRIPT-
sed -i -e 's/sync_blocks(self.nodes)/self.sync_blocks()/g' $(git
grep -l 'sync_blocks(self.nodes)' ./test/functional/*.py)
sed -i -e 's/sync_mempools(self.nodes)/self.sync_mempools()/g' $(git
grep -l 'sync_mempools(self.nodes)' ./test/functional/*.py)
sed -i -e 's/ sync_blocks(/ self.sync_blocks(/g' $(git grep -l
sync_blocks ./test/functional/*.py)
sed -i -e 's/ sync_mempools(/ self.sync_mempools(/g' $(git grep -l
sync_mempools ./test/functional/*.py)
-END VERIFY SCRIPT-
```
Commit test: Remove unused imports:
https://github.com/bitcoin/bitcoin/pull/15773/commits/fafe5f0d09db6778173a1079d93c314e9317708c
For easier review one can just run the tests and the linter. The other
changes are copyright dates and import ordering fixes related to the
changes.
Depends on D6152.