util: add CBufferedFile::SkipTo() to move ahead in the stream
Summary:
SkipTo() reads data from the file into the CBufferedFile object
(memory), but, unlike this object's read() method, SkipTo() doesn't
transfer data into a caller's memory buffer. This is useful because
after skipping forward in the stream in this way, the user can, if
needed, rewind the stream (SetPos()) and access the object's memory
buffer including ranges that were skipped over (without needing to
read from the disk file).
This is a partial backport of core#16981
https://github.com/bitcoin/bitcoin/pull/16981/commits/db929893ef0bc86ea2708cdbcf41152240cd7c73
Depends on D15959
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D15960