PHP 5.3 compatibility fixes.
Refactor template cache into php_v8js_ctx.

Reduce map lookups by adding internal object field pointing to function
template.  Use hidden field to allow easy unwrapping of PHP objects.