MOVEONLY: move package unit tests to their own file
Summary:
I also removed all the includes that are now flagged as unused by my IDE in the source file. And a unit test was renamed during the move. Otherwise, there is no change in the code.
This is a partial backport of core#23381
https://github.com/bitcoin/bitcoin/pull/23381/commits/68763783658f004efd9117fa7a69b0e271c4eaaa
Depends on D12360
Test Plan: ninja check
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D12361