[RFC] Revamp dialect registration

Only passes that introduce dialects not present in the input have, for example -linalg-to-scf only declares a dependency on SCF.
(see also the FAQ entry: FAQ - MLIR )