Protect m_managed by an own mutex to avoid potential deadlocks
By giving m_managed an own mutex, it becomes possible to
query the duchain in the constructor of parse jobs without
risking a deadlock. In clang such a query is very useful
to determine the translation unit to parse for a certain
file.