QmlDesigner: Plug mem leak when design mode is not opened

Change-Id: I4917dd3dd1d85b7eb35dce50d2283ac2039c0a2e
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>