Improve code editor modules system

Add virtual saveState() and restoreState() to BAbstractEditorModule and
BAbstractDocumentDriver classes. Change related classes.