61656212 link to json resource

This change is for https://www.pivotaltracker.com/story/show/61656212

Adds `<link>` tags that point to API resources in JSON format to tariff pages.

Also refactored API routes so that API responses would be served when requested with JSON format (`.json` at the end of the url) and when requested with `application/json` HTTP Accept header (with or without `.json` at the end of the url).