fix bug that caused Integration tests to fail. clearCurrentDocument was not clearing the EditorManager state