/// An async wrapper around `setTimeout()` and `setInterval()`.
///
/// # `setTimeout()`
/// `await (new AsyncTimeout(() => "value", 100)).timeout() /* === "value" */` is `setTimeout(()=> "value", 100)` promisified.
///
/// # `setInterval()`
/// `for await (const value of new AsyncTimeout(() => "value", 100)).interval()) { /* value === "value" */ }` is `setInterval(()=> "value", 100)` promisified.
/// This is an infinite iterator. To cancel the interval, simply break out of the `for await` loop.
///
/// # Parameters
/// * `thing` - The function to call after the timeout/interval. The result of the promise (or the yield for `interval()`) is the result of this function call. If the funtion throws, then the rejection of the promise will be that error thrown.
/// * `interval` - The time to wait for the timeout or interval