Add delayed-error testing feature to bogus gateway

Values of the form x3 now cause the gateway to sleep x seconds before raising,
in order to test behaviour of callers under high timeouts.