Tiled Gallery: Pass context object to partials.

Avoid having to litter the object context (by putting stuff into `$this`) for partials, and allow the `template` and `partial` functions have take a context object whose values will be extracted to the symbol table. Context required by partials is now passed via the context object.