append method
Append the entry
to the end of the UndoHeader linked list, so that
it becomes the new head.
Implementation
UndoHeader<E> append(E entry, int i) {
final newHeader = UndoHeader<E>(entry, i);
final UndoHeader<E> head = this.head();
// Link with the head
newHeader.prev = head;
head.next = newHeader;
return newHeader;
}