Do not hide the folder of the currently selected feed, or the currently selected folder, even if the folder has no unread entries.

This keeps the whole folder from disappearing if the user marks as read all entries in the single feed inside a folder.

Also, do not check for folder removal when cleaning read feeds from the sidebar. Folders should never be removed from the model in this case, as they actually still exist and should appear in the folder dropdown. The angularjs filter takes care of not displaying folders without entries in the sidebar, but they are not actually removed from the model.
WIP: make only unread feeds and folders appear by default in the sidebar, and toggle them with a navbar button.

Since the recent change in which only unread feeds are returned by FeedsController#index, the client cannot know if a folder is to be totally removed from the angularjs model after removing a feed from the folder. It could be that the client removes a feed from a folder and there are no more feeds in the folder as far as the client knows, but in the database there are actually other feeds in the folder; it just happens that those feeds currently have no unread entries and therefore they have not been sent to the client. In this case the folder should not be visible in the sidebar, but it should be in the dropdown menu because it actually exists and the user can move feeds to it.

So, the client has enough information to decide that a folder should no longer be visible in the sidebar (if there are no feeds with unread entries in it) but it no longer has the necessary information to decide if a folder has to be removed from the model (which would make it disappear from the sidebar and from the dropdown menu).

Instead of implementing some way for the client to have the information to make such a decision, I've opted for a simpler strategy: after any action which could potentially cause a folder deletion, the client loads the folder list again and replaces it in the scope. This way any deleted folders will disappear both from the sidebar and the dropdown.

This strategy implies some overhead because the full folders list is sent each time, which is somewhat redundant. However I think moving feeds and folders around is not an action I expect users to perform often, and the simplicity in the code trumps this overhead.

In the case of feeds which still exist but should not appear in the sidebar, this is already accomplished with an angularjs filter.

This change has forced me to abandon the bootstrap-accordion behavior of folders in the sidebar, because the folders list replacement made it act funny. Now I'm just toggling the "in" class, which opens/closes the folder, based on which folder is marked as open in the global scope. Basing comparisons on folder IDs and not in object equality, this works fine through a total replacement of the folders list in the scope. Really, the accordion animation was pretty but not very useful; also I intend to remove it from the entries list to implement some autoscrolling, and it would be weird having the animation on the sidebar but not on the entries list. Not a huge loss.

Wow. That was the longest commit message for some time. If you've read to this point, I'm sorry for the rambling. All this behavior is a bit tangled in my mind.
Changed an angularjs method name to better reflect its actual behavior.
Removed unnecessary line that should have been removed.
Removed two unnecessary lines that should have been removed. Angularjs services that retrieve the currently selected feed or folder always return an object present in the scope.

Angularjs services are now aware that the feed and folders list can have changed after the current feed or folder was selected and stored in the root scope (e.g. loading read feeds or removing a feed from a folder trigger AJAX reloads of the feeds and folders list, respectively). If the object stored in the root scope as current feed or folder was naively returned, it could happen that the object was not actually in the corresponding list; if the list has been reloaded, there will be another object with the same ID, but a different object nonetheless.

This returning of a different object breaks meny things in the view.

The fix is, every time that the current feed or folder is requested, search in the feeds or folders list for an object with the same ID as the one stored in the root scope, and return that object, thereby making sure that the returned object is in the list.
Ticks in the dropdown menu now are shown besides the correct option regardless of the feeds list having been reloaded.
Fixed the "read all entries" feature.
Fixed acceptance tests. Added ID attribute to the link that opens/closes sidebar folders.
Fixed acceptance test.
Fixed acceptance test.