Factored out the htmlt compiler logic so that it can be more easily tested outside of the context of the build process, and also so that it could be used in a browser-based template editor / previewer utility.