Use CSS transitions to animate opening/closing folders.

It's a bit complex because besides transitions in the folder content, transitions in the margins and padding of several sub-elements have to be added as well (otherwise the margins-paddings of those elements disappear suddently at the end of the animation, which causes a jerky effect).