Added support for automatic group memberships.

Now, when new TSD projects are created or updated, the project groups will be
populated with members as defined in cereconf.TSD_GROUP_MEMBERS. Another step in
automating the setup of projects.
Removed special handling of Database type errors. They'll be handled just like
other exceptions. Should avoid sending the full exception text to clients.

Also, some minor fixes:
- Removed 10+ year old 'TODO: does this work?', it obviously works...
- Removed unused, commented out function.
- Docstrings and deprecated exception raise calls.
- minor changes to the bofhd debug commands.

CRB-379:
Merge branch 'master' of ssh://utv.uio.no:7999/crb/cerebrum into CRB-332-tsd-mangler-gruppeinnmeldingar

Conflicts:
	Cerebrum/modules/tsd/OU.py

Fixed conflicts with later bugfixes in the group functionality.
Typo, s/Eiter/Either
As suggested, this will cause IntegrityError even if the account doesn't have
any spreads. Will even cause IntegrityError if no spreads are defined.

CRB-379:
Bugfix in how makedb.py ignores comments.

When makedb.py discovered long comments on single lines, the rest of the SQL
file were ignored. A few db-tables were therefore missing after setting up a new
Cerebrum environment.

CRB-388

We should change how db-tables and modules are related, but that have to happen
later. For now, we just need it to work.
CRB-340: Bugfix in double backslash in strings.

The backslash are somewhat special in python strings, so made the string raw to
avoid the issue.
Adding hostpolicy roles to new project hosts.

New projects gets new windows or linux hosts, if they are set up with that. Now,
these hosts will get the hostpolicy roles that is defined by cereconf.

CRB-386
Added error message if the otp type was invalid.

This was included to avoid sending bogus OTP keys to the gateway.
CRB-378

Also added an optional parameter for specifying the OTP type when executing the
command directly, instead of having to update the person's trait.
Merge pull request #55 in CRB/cerebrum from CRB-378-feilmelding-ugyldig-otp to master

* commit '1a4fd340456d1a4c6135fcd65ee783ed26171bb3':
  Added error message if the otp type was invalid.
Merge pull request #53 in CRB/cerebrum from CRB-340-wrong-homepath2 to master

* commit 'f8a205be69d3c2b14cfc788ff107c87aaca3ce82':
  CRB-340: Bugfix in double backslash in strings.
Forwards in Exchange is now managed by Cerebrum.

Users can now manage their Exchange-forwards trough bofh or Brukerinfo.
CRB-277: -forward-funksjonalitet-for-exchange
Merge pull request #56 in CRB/cerebrum from CRB-277-forward-funksjonalitet-for-exchange to master

* commit 'ab0a2732b7729f8e85a2651d76358b496f11fc3b':
  Forwards in Exchange is now managed by Cerebrum.
Merge pull request #32 in CRB/cerebrum from CRB-332-tsd-mangler-gruppeinnmeldingar to master

* commit '746d1cdb5e68230dbf442a975d6babe9bb5f70c2':
  Typo, s/Eiter/Either
  Added support for automatic group memberships.
Check if user is approved before password or OTP change.

This was requested by the TSD admins, to avoid any complications around
debugging why a user isn't in GW or AD.

CRB-366
Merge remote branch 'origin/master' into CRB-366-feilmeld-missing-spread

Conflicts:
	Cerebrum/modules/tsd/bofhd_tsd_cmds.py
Re-raise CerebrumErrors as the same type. Should fix issues with timeout and
re-authentication.

CRB-391-bofhd-session-expire
Oops.
CRB-391-bofhd-session-expire
Merge pull request #50 in CRB/cerebrum from CRB-379-bofhd-uncaught-database-error to master

* commit '9f458569443ff4602b85b0c6059217c27e006c30':
  As suggested, this will cause IntegrityError even if the account doesn't have any spreads. Will even cause IntegrityError if no spreads are defined.
  Removed special handling of Database type errors. They'll be handled just like other exceptions. Should avoid sending the full exception text to clients.
Merge pull request #57 in CRB/cerebrum from CRB-366-feilmeld-missing-spread to master

* commit '88d3f5bebc88798164bdcf9b051974a7b03be644':
  Check if user is approved before password or OTP change.