Minor: Cleanup apidocs
Introduce DocumentCursor::invalid
Get rid off DUContext::squeeze

It's a no-op.
Get rid off pthread usage in ForegroundLock

Quite unlikely that using QMutex here would be an issue. As discussed
with Milian.
FunctionDefinition::definition: Don't crash
Delay final cleanup of DataRepositories until end of DUChain shutdown.

This is required, as otherwise non-disk-refcounted items might get
deleted but then later-on accessed again. This is a reason for
random crashes during shutdown, which only occur for complicated
DUChain structures. Only then would further cleanup happen after
the call to ItemRepo's finalCleanup, and DUContexts still lie
around in memory...

Thankfully we had a reproducible test case with the code completion
unit test in kdev-qmljs (master) which is fixed by this patch.
Logically, I'm also confident that this is the correct approach.

BUG: 264931
Add a test to check DUChain shutdown/initialization.

Not so easy to reproduce the bugs there since they apparently
only occur for complex chain structures with many references...
Merge branch '1.7'
Remove DUChain::finalCleanup from public API.

It is highly dangerous to use this at the wrong place. Use ::shutdown
instead where required.
Remove dead code.
Cleanup code by using KDevelop namespace.
Fix compiler warnings about deprecated API usage.
Fix compiler warnings about deprecated API usage