Add std::optional support to Boost's equality check
Summary:
Also moved the operators to the bottom of the file since they're less important and to group them together.
Co-authored-by: Hodlinator <172445034+hodlinator@users.noreply.github.com>
Co-authored-by: stickies-v <stickies-v@protonmail.com>
This is a partial backport of core#30618
https://github.com/bitcoin/bitcoin/pull/30618/commits/743ac30e349e181c26a2d2af0bcb93b0835ce521
This allows addressing some TODOs in coins_tests.cpp (which turned out needed a bit more than just switching to c++20)
Test Plan: ninja check
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D18872