Add a stop_after_block_import field to the BlockManager options. Use
this field instead of the global gArgs.
This should allow users of the BlockManager to not rely on the global
Args.
This concludes backport of core#27125
https://github.com/bitcoin/bitcoin/pull/27125/commits/5ff63a09a9edd1204b2cc56cf6f48a44adab7bb3
Depends on D16186