Two HandleVerifier thread safety fixes.
Two HandleVerifier thread safety fixes.

Two changes in this CL:

1. Before setting the g_active_verifier, check that another thread hasn't
already set this. This is to cater for the situation where multiple
threads attempt to create the handle verifier in the same module at the
same time. The g_lock was not protecting the check to see if the handle
verifier had already been instantiated by another thread before setting
it. This could result in a handle verifier leaking and some handles
being tracked in the leaked verifier.

2. Always instantiate the handle verifier inside the main module, unless
the main module does not link with base. This means that there should be
always one instance that lives in the main module.

BUG=592753
TEST=base_unittests

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

Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#380581}

axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk