Return modified State from close_if_idle.

Also multiply ms instead of dividing us in order to avoid floats.

Same as 15366ff, but for HTTP drains.