Inject a clock into the gateway

Makes testing the async timeout behavior a lot simpler.
Also added a errors.AsyncTimeoutError so this can be caught, if needed.

[Finishes #71039042]