Front-end view fixes:

* Follow naming conventions
* Faster sample retrieval
* Pagination on the samples page
* A bunch of changes to the view functions
API-level fixes for GET requests
Save related field counts on Sample and Subsample