Catalyzed Cyclization of α,ω-Dienes: A Versatile Protocol for the Synthesis of Functionalized Carbocyclic and Heterocyclic Compounds