Support layout

Hi,

An easy-to-understand tweak for common use of ECTjs together with expressjs.
I wanted to have support for this kind of thing:
```
res.render("users/list", {
  layout: (req.xhr ? false : "users/layout"),
  users: [someArrayOfUserObjects]
});
```
Without any need of repeating code in the view template itself… This would probably bloat all small "templates" with one line - and this line for "extend" is not needed all the time.
For example - if I want a request with XHR, I want to receive only rendered view without any layout.

And here I have it to share.

The changes incorporate caching invalidation mechanism too.