Update manager.php

add caching to getUserGroupIds
Update manager.php

added description and blank lines in getUserGroupIds
Update manager.php

defined $uid in getUserGroupIds
Update manager.php
Update manager.php
Update manager.php
clean up function getUserGroupIds

clean up of function getUserGroupIds and improved caching mechanism of cachedUserGroupIds
modified caching mechanism in getUserGroupIds

removed cachedUserGroupIds, instead changed indexing in getUserGroups to groupId
adapted tests for a groupId indexed group array
fix in displayNamesInGroup: when specified limit N, we did complex search only in the first N users
Use afterBind to send fileId header for files and directories

afterBind is called for both files and directories and is now used to
send the OC-FileId headers.
change logic in displayNamesInGroup and add some unit tests
Append port to trusted domain in case it's not 80 or 443

Ref https://github.com/owncloud/core/pull/10584#issuecomment-54677059
Move select2 from files_external to core
Now using select2 for the groups excluded from sharing
Load select2 on admin page
Remove excludegroup.php

The ajax call is now using ajax/appconfig.php instead
Added select2 on the apps page

Moved setupGroupsSelect() from admin.js to a common settings.js
as OC.Settings.setupGoupsSelect().

Now using select2 as well on the apps page.
Fixed select2 for admin and apps page

Added explicit escaping.
Now internally using a pipe symbol as separator for select2, to make it
possible to use group names containing commas.
fit select2 to ownCloud input style