Add an inline attribute that substitutes a function
application for the body of the rule that matches.
This is still limited and rejects many easily
rewritable programs.
We would need to compile the intermediate terms to HVM
and normalize them then to properly and efficiently
handle all valid inlining cases.
I also separated each of the passes of the kdl compiler
to separate functions that go over the whole AST.
This is probably less efficient, but makes it easier
to reuse this code for other targets and to develop
new passes.
This commit also does some light refactoring of other
things surrounding the kdl compiler.