Render function for templates

Added `Templates::render()` and converted most files to use it, as per http://community.mybb.com/thread-157882.html