Add top-level compile() function that returns a template object (fixes #152).
Merge pull request #157 from af/compile

Add top-level compile() function that returns a template object