Substitution escaping

This adds '\' as an escape character in `Context::substitute()`, and also knocks 75% off the runtime of a basic substitution test. Best performance can be achieved by building with https://github.com/ImageEngine/cortex/pull/338, but it's compatible with Cortex master as well, and still gives good speedups with that.