Cycloadditions in heterocycle and alkaloid synthesis