Shutdown DUChain and item-repositories by ICore::shutdownCompleted() when available.
This will (unlike QCoreApplication::aboutToQuit()) work in unit-tests without any hacks.