Make it possible to set a user's team.

This is done by removing them from all other teams,
and then adding them to the new one.

Change-Id: I497e3c7c56ba8a4b110e33d38255fc48b120ee41
Break init of the modified groups list into a helper.

So that it can be called from child constructors without them needing
to incurr another call to LDAP.

Change-Id: I7a36bf82773f6eb1fbf10d21ad796979727cd859
Improve the mechanism for setting a users team & add tests.

Avoid modifying groups that are unchanged, and ensure that only one
change is made to the new team -- otherwise we might end up both
adding & removing the user from the group, resulting in no change.

Change-Id: Ia90a96e893b1010975ab1125442994eb8041b3df
Expose the teams a user is in as part of their details dict.

Change-Id: I845e5df262e53fec789174c2fbd0e209beffb1a3
Add helper function to determine if a user manages a given team.

Only authenticated teachers that are part of a team can manage it.

Change-Id: Ia20bed78015783ce89eb616babf495c49bb313b3
Replace _init with proper constructor chaining.

This involves changing to 'new style' python classes so that the parent
__init__ can be called via super(), though this should be harmless.
Add comments explaining what's happenning in the constructor so that
the bind and re-create of the srusers.user (which is no longer obvious)
is clear. Also use a local rather than re-using the instance _user field
for the password check.

Change-Id: I4e1681a960e0aa761bb58b3ba89719bd7b2c4707
Merge pull request #3 from PeterJCLaw/fix-17

Let teachers change students' team.
Bump srusers to pick up Explicit Exceptions fix.

Change-Id: I80e11acb1a2448dd9e4eafd56030aea2cfda7331