add optional countUsersInGroup method to group backends

Required for https://github.com/owncloud/core/pull/7151

Currently the only method to count users in a group is to count the entries in the array returned by usersInGroup(). This has the disadvantage to  have high overhead and is especially dead slow with LDAP. Just counting users saves a lot of otherwise unnecessary additional treatment with users.

How to test? Currently only with unit tests, which are provided herewith for both core and LDAP classes. First usage will be implemented in #7151 once this is merged. It is an optional extension to the group backend, i.e. it will not break anything.