Fix calculating size for empty folders

Conflicts:
	lib/files/cache/cache.php
Use query to calculate folder size
Use old database methods for caclulateFolderSize