Check if the size field is available

In some cases the 'size' field is not available resulting in some PHP errors such as:

```json
{"reqId":"03548fd9e3d3aca15a5796b3b35d7b9d","remoteAddr":"::1","app":"PHP","message":"Undefined index: size at \/Users\/lreschke\/Programming\/core\/lib\/private\/files\/fileinfo.php#125","level":3,"time":"2014-11-17T21:38:57+00:00"}
```

This can be experienced when creating a new empty file and deleting it right away, then when going to the trash bin this error is thrown.
make sure that we don't find the wrong shares if a user and a group have the same ID
make sure that we only find the shares from the correct share type if users and groups with the same ID exists
use the new base class for unit tests
only users can have a display name different from the id
Fix type hinting for app manager
Merge pull request #12242 from owncloud/fix-undefined-size

Check if the size field is available
Merge pull request #12259 from owncloud/app-enabled-plugin-appmanager

Fix type hinting for app manager
$file only contains the filename and not the absolute path, that means that files in a subdirectory will not get properly resolved and an empty filesize is returned.

This feature only exists on master.
Merge pull request #12224 from owncloud/fix_12211

make sure that we don't find the wrong shares if a user and a group have the same ID
Merge pull request #12264 from owncloud/use-full-path-for-filesize-calculation

Use full path instead of only the filename
Fix case-sensitivity
Don't disclose relative directory path for single shared files of user

The "dir" key is used within the public sharing template to indicate in which directory the user currently is when sharing a directory with subdirectories. This is needed by the JS scripts.

However, when not accessing a directory then "dir" was set to the relative path of the file (from the user's home directory), meaning that for every public shared file the sharee can see the path.
(For example if you share the file "foo.txt" from "finances/topsecret/" the sharee would still see the path "finances/topsecret/" from the shared HTML template)

This is not the excpected behaviour and can be considered a privacy problem, this patch addresses this by setting "dir" to an empty key.
Remove unused variable and make Scrutinizer happy.