Use stale? method to implement conditional GET support (aka HTTP caching) in FeedsController#show action.

Client-side support in angularjs forthcoming.
WIP: when certain changes are made, update the updated_at attribute of subscriptions.

Specifically:

- when a feed title changes
- when a feed url changes
- when a feed is moved into a folder or out of a folder

This way when any of those changes is done, the updated_at attribute of associated FeedSubscription instances is updated to the current date, invalidating the HTTP cache in FeedsController#show. This means that after any of those changes, when a user next requests JSON describing the feed, a new JSON is returned with a 200 status, instead of returning a 304.
After a user moves a feed into or out of a folder, the corresponding FeedSubscription instance is touched.

This means that after a user moves a feed into or out of a folder, the HTTP cache for that user and feed in FeedsController#show is invalidated, and the user will be sent a fresh JSON with the new values the next time he requests the feed's data.
HTTP caching in FeedsController#show uses only last_modified field, not etag.

In our case the app is more time-based than entity-based. Using last_modified exclusively makes more sense.
Removed extra parameter when requesting a single feed data via Ajax. HTTP caching now works as expected for requesting single feeds.
Reorganization of FeedsController#index. Action has been broken up into several methods, instead of a monolythic one.
Added subscriptions_updated_at attribute to Users model.

The idea is that this attribute will be updated every time there is a change in users subscriptions; that is, a change that would change the JSON returned by FeedsController#index. This way, HTTP caching can be implemented in FeedsController#index by using this new attribute as last_modified value.

Implemented: added attribute. It takes a default value of the current date/time when a User is created.
Not implemented: actually update the attribute when subscriptions are updated.
Fix bug in FeedsController#show: control the case in which the subscription cannot be found.
Fix test: subscribe user to feed at the right moment during testing.
Removed NOT NULL constraint in subscriptions_updated_at attribute of User model.

It seems that the invite! method added by devise_invitable to the User model saves users in the db without going through the before_validate callback. This means that every time an invitation is sent, a User is saved in the db without passing a value to this attribute; this raises an ActiveRecord error if the attribute has a NOT NULL constraint.

The fix is to remove the constraint so that devise_invitable can save invited users with the subscriptions_updated_at attribute set to null. This is not a huge issue because after that users should pass through the before_validate callback, which sets the attribute to the current date/time if it has a null value.
Fix test: subscribe user to feed at the right time during test.
WIP: update the subscriptions_updated_at attribute of User instances when necessary.
WIP: update updated_subscriptions_at attribute of User instances when appropiate.
WIP: update subscriptions_updated_at attribute in User instances at the appropiate times.
Use ActiveRecord callback to calculate the initial unread count when creating a feed subscription, instead of invoking a method as part of subscription.

It's nicer to be declarative rather than imperative. Also the new method is a bit faster because it just counts entries without looking at entry states (when a subscription is created, all entries in the feed are unread for that user).
Remove unnecessary require statement.
When there is a change in subscribed feeds, the subscriptions_updated_at attribute of the User instance is updated with the current date/time.
Added conditional GET support (HTTP caching) to FeedsController#index action, but only when listing all subscribed feeds.

HTTP caching when listing all feeds in a folder is not yet implemented.

HTTP caching uses only the last-modified header (no etag), and it's based on the subscriptions_updated_at attribute of the current user.
Do not pass the current time when requesting all feeds from the angularjs client.

Passing the current time as a parameter prevents the client from using HTTP caching properly.
User#subscribe method returns the subscribed feed.

This was recently changed and broke some things. Changed it so that the subscribed feed is returned again.