Lazily populate changed_anything in the template context

This isn't always used by the template, and is expensive to calculate.