Trim input on noel applyTemplate. (Fix #387)
Use String.trim() when available, fixes node tests.
Add test for #387.
Move template trimming to `renderTemplate`, cache trim function.
Merge pull request #391 from ssafejava/applyTemplateTrim

Trim input on noel applyTemplate. (Fix #387)