Synthesis and reactions of 2-chloro-3,4-dihydrothienopyrimidines and -quinazolines