Depends on bitcoin-core/libmultiprocess#342. Only the last commit belongs to this PR.
The blocking methods (waitTipChanged, createNewBlock, and BlockTemplate::waitNext) currently rely on interrupt()/interruptWait() to cancel them when they are in progress (#33676, #34184). With request cancellation support in libmultiprocess (bitcoin-core/libmultiprocess#342), this is no longer needed.
This PR adds CancelArg arguments to those blocking methods to register a callback that runs on cancellation and deprecates the interrupt methods.
In the capnp schema, use the Proxy.extraParam annotation for the C++ CancelArg parameter and the Cxx.allowCancellation annotation to enable request cancellation at the RPC layer.
In tests, update miner_tests to cancel waitNext() from another thread, and interface_ipc_mining.py to drop the response promise. Also add drop_promise() to ipc_util.py to abandon capnp promises.
Additional note: this is the Bitcoin Core side of approach 4 in #33575.