Replace boost::adapter::reversed with custom reverse_iterator
Summary:
This removes the dependency to boost.
Based on core PR10193
Test Plan:
make check
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Subscribers: teamcity, schancel
Differential Revision: https://reviews.bitcoinabc.org/D2212