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.
add postfix

add postfix
detect user display name attribute and return user count depending on its presence
consolidate user count filter in wizard and user back end
detectors (email, displayname..) are now started in one place, triggered from only 2 places. more reliable structure and flow, saves requests
to reassure that selected attributes still work, do not count all matching entries but limit it to 1 in order to make it faster
a corrected email attribute needs to be saved, not only returned
JS doc
this happens already before counting, no need anymore
use underscore.js for undefined checks
better readbility, no effective changes
phpdoc and mixed up letters
trigger count on the correct filter
fix counting when ldapPagingSize is 0
make updateCount work properly with new xp'd mode as well as without
make scrutinizer happier and always count users on assisted mode, even with xp'ed mode (would be a regression otherwise)
Remove OC_Migrate

This is unused legacy code. Let it die with ~~~honor~~ fire.

Fixes https://github.com/owncloud/core/issues/12346
Close session only if encryption app is not enabled

Fixes https://github.com/owncloud/core/issues/12389