Fixing an issue with browser disconnection and task timeouts.

This commit fixes the following bug: when a browser is disconnected
during a test, the task timeout function is not canceled. When it is
executed, it assigns a new task to the disconnected browser, which
will lead to a timeout (as there is no browser connected to execute
the task), and then another task will be assigned and so on...