Refactor code to filter kwargs into function

This just makes the code slightly easier to read.
Adding comment about query string params in urls
Move JSON serializing code to libs and added tests

It makes sense to move this code into a library function to aid reuse.
Move views into their own directory

This mirrors the structure used in models and admin.
Merge pull request #31 from alphagov/refactor-data-set-json-endpoints

Refactor data set json endpoints