Functionally substituted arylhydrazones as building blocks in heterocyclic synthesis: routes to pyridazines and pyridazinoquinazolines