Mechanism of the Stevens rearrangement of ammonium ylides