add new file above summary if it is the first file in the list
call expire function before writing the new version to make sure to have enough free space
it is enough to call the expire function once
also expire versions on rename, to update the history more regularly
fix typo in comment
adjust comments
fix some var names according to our style guide
continue cleaning-up old versions if availableSpace=0. It's not necessary but gives us some additional free space, especially in the case of a hard quota
fix array access and change variable names according to the coding style
Merge pull request #4037 from owncloud/add_new_file_above_summary

add new file above summary if it is the first file in the list
Merge branch 'master' into ext-fs-irods-master