Added unread_entries attribute to the folders FactoryGirl factory definition, with a value of zero.

It's not strictly necessary, because that attribute defaults to 0 if no value is given. Still I think it's better that factories are as explicit as possible.
Added unread_entries attribute to User model. This attribute is automatically updated to keep a count of the unread entries in all feeds subscribed by the user.

This will allow us to display this number in views without having to do an expensive SQL count operation on each page load.
The unread_entries attribute of the User model is used when displaying the total number of unread feeds, instead of having to perform an expensive SQL count on every page load.

This should improve load time.

To enable this, the current user object has to be reloaded from the database in some controller actions, just before rendering the response. The reason is that the unread_entries attribute of the user object could have changed during the action (e.g. when marking an entry as read, this attribute is decremented by 1), and we have to display the updated attribute value in the response.