wallet: Add output grouping
Summary:
This is a patial backport of Core PR12257 : https://github.com/bitcoin/bitcoin/pull/12257/commits/87ebce25d66952f5ce565bb5130dcf5e24049872
Also includes the following bug fix:
- [wallet] correctly limit output group size
Extracted from Core PR13805 : https://github.com/bitcoin/bitcoin/pull/13805/commits/57ec1c97b2d0c0ba6056a43fa4177efc39567ae2
Test Plan:
make check
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D3393