hogan.js style template inheritance

Modeled after [hogan.js](https://github.com/twitter/hogan.js), with functional tests for template inheritance copied from the hogan.js [test suite](https://github.com/twitter/hogan.js/blob/master/test/index.js#L733).

An additional test I performed was modifying the [mustache/spec](https://github.com/mustache/spec) to have these same template inheritance rules. I then successfully ran the test suites of mustache.php with this patch and the most recent version of hogan.js after pointing them both at my modified mustache spec. It appears that they are both 100% compatible with one another.

This wasn't a solo effort by any means. Much thanks to my coworkers @dtb, @mdg and @benburry at @Etsy.