Adding an option to automatically restart failing tasks.

When the --task-restart-on-failure option is enabled, failing tasks are
also automatically restarted as if the browser was disconnected.
This option is especially useful for test suites which are not very stable,
with tests which can randomly fail.