Solid-phase synthesis of structurally diverse heterocycles by an amide–ketone condensation/N-acyliminium Pictet–Spengler sequence