Cache: reuse known folder sizes when doing a shallow scan

This fixes having to do a full recursive rescan of a folder when the content of the folder changes.

@butonic @DeepDiver1975 @MTGap @karlitschek