Adjust logic for deciding if trashbin empty

Any error in opening the trashbin directory returns 'true' for isEmpty.
An error is prevented by checking if the directory exists before trying to
open it.
Prevent error in files_trashbin

`glob` can return FALSE when the directory is empty, instead of an empty array,
causing an error at `foreach`.

"Note: On some systems it is impossible to distinguish between empty match and
an error."

See http://www.php.net/manual/en/function.glob.php -> Return Values
Prevent error from cache update on deleted files
Fix user_ldap default setting value
Merge pull request #8189 from Xenopathic/misc_fixes

Various fixes