CppEditor: Fix crash on Creator shutdown

As a consequence of commit 243a625, the order of destruction of
CppEditorWidget and CppModelManager changed. Since now the
CppEditorWidget is deleted last, we need to check if the model manager
object still exists.

Change-Id: Ie61b4e3ea07b44f99ae6c21c1d8ac7c799f3620d
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>