cc: RenderPass::CopyAll should not break if quads are culled.

If quads are culled from more than one consecutive layer, then multiple
shared quad states may appear in the list but not be used. CopyAll
should not break in this scenario, so use a loop instead of an if to
to find the corrent shared quad state.

This is validated by the cc_messages IPC de-pickling already, and
it allows this valid IPC through, but then we fail to deal
with it in CopyAll.

Tests:
RenderPassTest.CopyAllWithCulledQuads

R=piman
BUG=311438

Review URL: https://codereview.chromium.org/45033002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231122 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 231122
Workaround for NPChannelBase multithreaded use

Android uses NPChannelBase on a thread in the browser process (for the
Java bridge). Further, WebView runs in single process mode meaning it
has two threads competing for use of non-threadsafe globals. Moving these
to TLS workaround this. A real fix will under crbug.com/258510

Also move the std::stack of scoped_refptr to just use scoped_refptr on
the callstack, as this seems simpler.

BUG=298179

Review URL: https://codereview.chromium.org/38233006

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231123 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 231123