Build an explicit pipeline around style and paint stages.

Ready for a preliminary review. Note further work is required before merge (e.g. some of the demos don't work...)
grammar monkeys: invocation.