Reland "[ios] Store TaskRunners instead of threads in WebThreadImpl."

This is a reland of 3d3f6bf113b71a9d0d2a259152581a5d65f76a22

The call to ResetGlobalsForTesting() has been moved from
TestWebThreadBundle to TestWebThread, as some unittests instantiate
TestWebThreads directly.

Original change's description:
> [ios] Store TaskRunners instead of threads in WebThreadImpl.
> Track thread states explicitly instead of simply checking
> whether a TaskRunner pointer exists or not.
> BUG=826465
> Change-Id: Id0f84e7eedc6b9f6568aec629abbb86f46979efa
> Reviewed-on:
> Reviewed-by: Rohit Rao <>
> Reviewed-by: Sylvain Defresne <>
> Reviewed-by: Gabriel Charette <>
> Commit-Queue: Rohit Rao <>
> Cr-Commit-Position: refs/heads/master@{#616319}

Bug: 826465,914869
Change-Id: I522b1bb46464a17ade84a20857ee7db2cb713a8d
Reviewed-by: Sylvain Defresne <>
Commit-Queue: Rohit Rao <>
Cr-Commit-Position: refs/heads/master@{#616723}
4 files changed