Instead of using instance methods to perform the
compilation of tasks and flows instead move the
logic of those functions into tiny helper classes
that just perform the compilation of specific types
they handle.
This makes it more easy to document and understand
how a flow or task type is compiled down into a graph
and a tree node (which may or may not be attached to
a parent tree node).
Change-Id: Ib74edcad44556a897a4300132066e89d97739814