Refactor backend to better separate responsibilities.

- Add to_json() methods to each object type and add corresponding collection types with their own to_json() methods which call the per-object ones.
- Refactor URLs to be more consistent.
- Get rid of direct access to *.json data files, make even these go through the API via to_json() methods so as to permit adding optional attributes along with the returned data.
Add area for news alerts on main page.