Linear queries for GroupsFinder

app/finders/groups_finder.rb queries with ObjectHierarchy directly rather than through group traversal methods.

These result in slow queries.

Also for GET /api/:version/groups requests as per the slow log. Some of the slowest queries around.

Edited by Alex Pooley