Change dirty detection to a property.

Since it's going to be called in an `editor:display-updated` handler, I don't
want to be doing a bunch of text comparisons if I can avoid it.`