FIX: $Layout should not be executed if inside cached block

If you have $Layout inside of some <% cached %> tag, Layout should not be
executed if the cached content is available.  Prior to this commit Layout was
executed in advance of rendering the template and passed to the underlay as
a variable.  It is now passed as a closure so it is only executed as needed.

See https://groups.google.com/d/msg/silverstripe-dev/itYU50HoH50/aR6grcPIBSYJ