appendAlt method
Append the entry
to the end of the alt UndoHeader linked list, so that
it becomes the new altHead.
Implementation
UndoHeader<E> appendAlt(E entry, int i) {
final newHeader = UndoHeader<E>(entry, i);
final altHeader = altHead();
// Link with the previous headers
newHeader.prev = prev;
// Link with the altHead
newHeader.prevAlt = altHeader;
altHeader.nextAlt = newHeader;
return newHeader;
}