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. Registering returns a CancelGuard that unregisters the callback when destroyed, so the event loop can't run it after the wrapped method goes out of scope.
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.
The CustomBuildExtraParam/CustomReadExtraParam overloads for CancelArg live in ipc/capnp/common-types.h, following the reference implementation in the libmultiprocess PR. The client side wraps the request in a kj::Canceler and throws InterruptException when canceled, while the server side registers the method's callback with the request's server context, where the event loop runs it on cancellation.
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, and a cancelable waitCancel method to the ipc_tests FooInterface to exercise both the client and server hooks.
Additional note: this is the Bitcoin Core side of approach 4 in #33575.