Avoid having current editor that is not in a view.

Was triggering soft assert when opening a session with multiple files
open, and then closing the first one.

Change-Id: I23a503904222b0126dc36d8b2dcc64021393b45c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>