Permit modes to enhance the text editor by overriding the textarea Painter.

This permits Python mode to draw an indentation indicator, which is common in Python editors.