Intramolecular palladium-catalyzed 1,4-addition to conjugated dienes. Stereoselective synthesis of fused tetrahydrofurans and tetrahydropyrans