Strip leading/trailing whitespace on optimize

Replacements taken from https://github.com/gruntjs/grunt-contrib-handlebars#processcontent