More explicit thread checking in SafeBrowsingDatabase.
As part of trying to understand threading rules for SafeBrowsingDatabase
I added these explicit checks which helps documenting the expected flow.
Also replaced old checks with modern Chromium synchronization constructs
and explicitly mark SafeBrowsingStoreFile non-thread-safe.
These new checks helped catch issue 438754 and issue 442891.
More robust thread safety coming in
https://codereview.chromium.org/790703003/
BUG=
438754,
440517,
338486
Committed:
https://crrev.com/d330bbbc6523984e903baaa41ce208f4f72691c4
Cr-Commit-Position: refs/heads/master@{#308673}