Add delayed-error testing feature to bogus gateway

Values of the form 3x now cause the gateway to sleep x seconds before raising,
in order to test behaviour of callers under high timeouts.

@jnormore @fw42 @girasquid @louiskearns