One-pot synthesis of N-heterocycles and enimino carbocycles by tandem dehydrative coupling–reductive cyclization of halo-sec-amides and dehydrative cyclization of olefinic sec-amides