Simplify locking in HRTFDatabaseLoader

The locks in loadTask() and loadAsynchronously() were blocking each
other for about 100 msec or more, causing the jank in the bug report.

Only the lock is loadTask() is needed because that's what writes the
m_hrtfDatabase pointer.  loadAsynchronously() doesn't need a lock because it
doesn't need to read m_hrtfDatabase.

Also simplified isLoaded() and database() which basically do the same
thing except for the return type.

database() (and, indirectly, isLoaded()) also gets a tryLock because
it is called from the audio thread which can't block.

BUG=602668
TEST=No jank in test in 602668

Review-Url: https://codereview.chromium.org/2154473003
Cr-Commit-Position: refs/heads/master@{#406389}
2 files changed