This patch replaces all occurrences of SmartMutex<true> with an STL mutex.
This introduces a minor behavioral change. Previously, in situations where LLVM_ENABLE_THREADS was false, or where llvm_start_multithreaded() had not been called, SmartMutex<true> ended up a no-op. With this change, a mutex will actually be acquired, even for single-threaded code.
This has been discussed previously on the mailing list and there was some consensus that this was OK as the time required to acquire an uncontended mutex is extremely low on any sane mutex implementation, but I'm posting it again for wider review. It's worth pointing out that a test compiling a very large TU with and without the patch shows no noticeable difference in wall-clock time.