JSON support for all endpoints

by appending ?format=json the views will return the results as JSON.
Not ready for master. The feature is working but there will be some
refactoring first since changes the web package a bit.
refactor helpers
only pass URL values to responseFormat
add test for responseFormat
refactor rendering

- move HTML and JSON rendering to a function
- responseFormat got a default case
Merge branch 'master' of github.com:fallenhitokiri/leeroyci into json
update docs
make sure responseFormat is always lowercase
Merge pull request #5 from fallenhitokiri/json

JSON support