Add encode helper

My answer to https://github.com/interagent/http-api-design#keep-json-minified-in-all-responses

Shall this be in `Endpoints::Base` so that one can easily extend it or better as helper module in pliny?

Todo:

* [ ] Update template in `pliny`