Green Synthetic Approaches for Medium Ring-Sized Heterocycles of Biological Interest