Thread safety: move the inline function back into a namespace

Moving it into a struct makes things work because it implicitly marks
the function as inline.  The struct is unnecessary if you explicitly
mark the function inline.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205935 91177308-0d34-0410-b5e6-96231b3b80d8