function delay( retries, max ) {
	var d = pow( 2, retries ) - 1;
	if ( d > max ) {
		d = max;
	}
	return d;
}
Computes an exponential delay.

@private
@param {NonNegativeInteger} retries - number of retries
@param {number} max - maximum delay
@returns {NonNegativeInteger} exponential delay