Reimplement filesummary in JS

Fix #993
Merge pull request #3926 from owncloud/improve_filesummary

Improve filelist summary