Make unrestricted ChaCha20 cipher not waste keystream bytes
Summary:
Co-authored-by: dhruv <856960+dhruv@users.noreply.github.com>
This is a partial backport of core#26153
https://github.com/bitcoin/bitcoin/pull/26153/commits/12ff72476ac0dbf8add736ad3fb5fad2eeab156c
Depends on D18818
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D18819