if we read a .part file we try to get the file info from the real file

if we read a .part file we try to get the file info from the real file.

fix issue discussed here https://github.com/owncloud/core/pull/11659#issuecomment-60232838

This makes sure that we don't try to calculate the unencrypted size from part files during upload.

cc @DeepDiver1975 @jknockaert please review, thanks!
The problem is that at this point we write the file info: https://github.com/owncloud/core/blob/master/apps/files_encryption/lib/stream.php#L641. But we always write it for the real file, not the part file which was written at this point in time. That's not a problem if the original file already exists because then the existing file cache entry gets updated. But if it was the first upload, then the original file doesn't exists yet.

Here we ask for the file size to verify if the complete file was uploaded https://github.com/owncloud/core/blob/master/lib/private/connector/sabre/file.php#L110. To make the check work we need the unencrypted size, but it is not in the database, because the target file doesn't exists yet. Therefore we need the value from $partial. But at this point we no longer operate on the same instance of the cache class like we did when we updated the $partial array. That's why I made it static. To have this information across multiple instances of the class cash. Hope I could explain the reason behind it. I'm open for other solution, but right now I can't think about one.