Substituent-directed reduction of cyclic aminals leading to two different heterocycles selectively: syntheses of functionalized nicotines and pyrido[2,3-b]azepines