Divergent Synthesis of Multisubstituted Tetrahydrofurans and Pyrrolidines via Intramolecular Aldol-type Trapping of Onium Ylide Intermediates.