Refactor template diffing to store an enum that records which type of
difference is stored inside a DiffNode.  This should not change any
diagnostic messages.