Move dirty tracking into a new VT100LineInfo class. Fix a few bugs discovered in the process