Class for rendering, plus unit specs and some cleaning up.

I realise this pull request is a significant change to the entire project. Happy to discuss things... perhaps it's worth reviewing on a per-commit basis, which should help explain what I've done a bit more clearly.

The reason for all of this is I'd like to be able to call rendering of templates within the logic of a Grape endpoint... I'm not yet sure how that'll be possible without the automatic translation of the render into a double-JSON'd string, but I figure these changes are worthwhile in and of themselves.