Add FileExtensionTextMode plugin

a plugin to customize the join of file extension and the text mode.

also add an API to the editor for this.