Add method to render template to string to templating systems.

It is not always convenient to have the template in a file, and the
output written to a file.  Rendering from and to a string is useful.
Merge pull request #881 from punchagan/render-to-string

Add method to render template to string to templating systems.