Compiled function toString method added

Add method for easier template code compilation. Uses this in runtime template compilation and templates packaging without using command line utilities. Result code need to be wrapped on the client.