get permissions directly from share storage to avoid additional db calls

This saves quite a lot of db queries. All files within a share always have the permission given by the owner, no need to do expensive db calls.

@icewind1991 please have a look at it, especially to my changes to OC\Files\Cache\Permissions

cc @PVince81