Pass KTextEditor::MainWindow to text views created from TextDocuments
This enables the plugin mechanism to work properly for these views. Previously, the a nullptr window was passed, which disabled all plugin hooks.