Introduce new stage(s) between preprocessing and validation.

Transformations can be simplified if they are done in multiple
stages. This commit makes it possible to add AST matcher stages
between preprocessing and validation.

Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>