test: add tests for bitcoin-cli -generate
Summary:
This is a backport of core#19133 [7/10]
https://github.com/bitcoin/bitcoin/pull/19133/commits/18f93545a12db00180cea369a4b5cce7f10cd362
Depends on D9946
Test Plan: ninja check-functional
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Differential Revision: https://reviews.bitcoinabc.org/D9947