Do not open documents after DocumentController::cleanup()

For now d->shuttingDown is checked in just one of many
DocumentController::openDocument() overloads and alternatives, because
this is the only overload that is known to be called after cleanup() and
cause crashes. If similar crashes happen because of other ways of
opening a document, the check can be moved or reused elsewhere.
Or perhaps a different strategy will be needed to fix these hypothetical
future crashes: e.g. simply returning nullptr doesn't work if the caller
dereferences the returned document pointer without checking.

BUG: 425994
FIXED-IN: 5.6.1
1 job for !161 with fix-debugger-crashes-on-exit in 60 minutes and 38 seconds (queued for 57 minutes and 52 seconds)
detached
Status Job ID Name Coverage
  Build
failed #72954
linux kf5-qt5 qt5.12

01:00:38

 
Name Stage Failure
failed
linux kf5-qt5 qt5.12 Build The script exceeded the maximum execution time set for the job
[  3%] Building CXX object kdevplatform/sublime/CMakeFiles/KDevPlatformSublime.dir/ideallayout.cpp.o
[ 3%] Building CXX object kdevplatform/sublime/CMakeFiles/KDevPlatformSublime.dir/idealtoolbutton.cpp.o
[ 3%] Building CXX object kdevplatform/sublime/CMakeFiles/KDevPlatformSublime.dir/idealdockwidget.cpp.o
[ 3%] Building CXX object kdevplatform/sublime/CMakeFiles/KDevPlatformSublime.dir/idealbuttonbarwidget.cpp.o
[ 3%] Building CXX object kdevplatform/sublime/CMakeFiles/KDevPlatformSublime.dir/message.cpp.o
[ 3%] Building CXX object kdevplatform/sublime/CMakeFiles/KDevPlatformSublime.dir/messagewidget.cpp.o
[ 3%] Building CXX object kdevplatform/sublime/CMakeFiles/KDevPlatformSublime.dir/debug.cpp.o
[ 4%] Linking CXX shared library ../../bin/libKDevPlatformSublime.so
ERROR: Job failed: execution took longer than 1h0m0s seconds