[#1038] PEP8 fixes only.
[#1038] Reverse the meaning of group member of group.

Now member.table_id is the *parent* of member.group_id (not the child). This means the permissions work - a user needs permissions for the member.group_id to change its members, and it makes more sense for a group to choose its parents than its children. This is because a user with rights higher up the tree often gets given automatic rights to groups lower down. If he can also make any other group a child, then he would give himself rights over it.

Added test for the group permissions to check it made sense

Fixed bug in get_top_level_groups - the 'and' was ignored before. The existing test picked this up.

group.get_groups meaning is expanded. Seems to only get used in
_group_or_org_update and treats the result as parents. Needs further
examination when doing the form work on this ticket.