This is a speculative fix to leftover tmp directories.
When users issues SIGINT twice, we enter `gracefullyClose()`
twice, and shortcut the second time. It turns out, we do
not wait for directories removal.
Note: it is unknown how often we reach this codepath in practice.
There are a few ways for `connect()` to finish:
- `Browser.close()` from the client side.
- Browser on the server side did exit (e.g. crashed).
- Connection was dropped by either of the sides.
We reduce all the cases to the last one by dropping the
connection when client wants calls `Browser.close()` or
server-side browser exits.
In all these cases we should properly cleanup on the server side,
and ensure that all promises reject on the client side.