Speed up octemplate rendering.

This cuts ~40% of the rendering time for Firefox. Chromium shows little difference as it's considerately faster than FF, IE 8 seems faster, but doesn't have console.time()/timeEnd().

Tested with Firefox 21, Chromium 25 and IE 8.