remove whitespace
better indentation, etc
updated example event_item 

- we made field names more js friendly
fix: attachments name changed, missed this earlier
start of refactoring

- making helper functions protected so it is 
  more obvious what the main entry points are
on connection failed, retry more and do better error msgs
better error handling
refactor to eliminate common code
adds ability to fetch a single attachment
adds dev section & debugging gems
adds good json output for event_items

To view, here are some sample URLs:

/events/1940/event_items/34418.json
/events/1940/event_items.json

Note that they include the attachments for each item, when available.
eliminates need to list attributes independently
adds attachments as a property in the response

Also makes ‘attachments’ available on EventItem (but sadly, that doesn’t mean the JS object compiled by respond_with(@response) includes an array of attachments as we’d hope.

See, ideally, from JS we’d just access response.event_items[x].attachments instead of response.attachments[x], but it wasn’t obvious how to get ActiveRecord to permit the addition of an ‘attachments’ attribute on EventItem (a virtual attribute not mirrored in the database).
eliminates need to use ajax to fetch attachments

(since the server is already giving them to us now)
refactor: shorter code, same effect
eliminates ajax calls for event info

- to speed things up, since the server knows from the first request what data will be fetched, we send it all over, and then the front end doesn’t need to do separate AJAX requests. For example, for a location in a district with N upcoming items, this eliminates N AJAX requests.
gets more data