use ThreadsafeIsCallerChrome() instead of IsCallerChrome()
This is a spinoff from #14205 (moved). For Tor Browser 5.0, we should replace all of the calls to ThreadsafeIsCallerChrome() with IsCallerChrome() in our browser patches. See ticket:14205#comment:7 for more background info.
I will post a patch soon.