File permissions are part of the ajax response of file upload

This is necessary in cases where the parent folder permissions are different from the file permissions inside.

Because the file actions are recreated after upload this raises the question if the file actions should be displayed during upload at all.
In a scenario where the delete permission is removed after upload the delete icon is shown during the upload.
@jancborchardt @karlitschek @MTRichards 

Fixing #4488 

Backport required

@rperezb Can you please test this change? THX