[Extensions] Make g_test_content_verify_job_observer thread-safe

ContentVerifyJob has ability to inject test observer, but before this CL
the observer is accessed from different threads, leading to flaky
crashes in tests. See https://crrev.com/c/2032998.

Now this observer (ContentVerifyJob::TestObserver and pointer to it from
g_test_content_verify_gob_observer in content_verify_job.cc) supports
thread-safe refcounted pointing, therefore is not destroyed too early.
Also it's wrappend into lazy initialized since we need access to it be
no-op outside of the tests.

Bug: 796395, 958794
Change-Id: I7479216f23083d4fd41dae08cb2e7acb62da0abd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2033159
Reviewed-by: Sergey Poromov <[email protected]>
Reviewed-by: Istiaque Ahmed <[email protected]>
Commit-Queue: Oleg Davydov <[email protected]>
Cr-Commit-Position: refs/heads/master@{#739387}
5 files changed