ProgramTextUI: added dirty text tracker

Tracks whether the written program has changed since we last lexed it.