TextEditor: Introduce a BaseTextEditorFactory

The BaseTextEditorFactory will keep a collection of all
relevant creation functions (document, editor, widget,
indenter, syntax highlighter) and will use them to
create or duplicate base text editors in a uniform way.

Change-Id: I255b519e35cf1c28d5e198242f99316951a0235e
Reviewed-by: Christian Stenger <christian.stenger@digia.com>