Modifies a tree by switching the positions of n leaves. To avoid
later swaps undoing earlier exchanges, all n leaves are guaranteed
to change position. Note, however, that no attempt is made to avoid
swapping equivalent leaves, for example, a pair that are each others'
closest relatives. As such, the relationships within a tree are not
guaranteed to be changed.