Added timeout check to get_entity_id (where the session is actually validated,
and last_seen is updated). Refactored a bit, and pep-ified.
cbr-393-bofhd-timeout
Added a check on that the given object_classes are from correct superclass.
Added initial tests for the AD2 sync.

Created a setup for being able to test more than this Cerebrum module, as we
will need it in the future. The motivation is to save work by having a common
setup which could be reused.

Note that not all the AD2 tests are working yet, and some are only skipped for
now, as they're not completed. This is only the first attempt at testing the AD2
sync.
Tiny typo, s/entitites/entities.
Improves and stabilise the update of AD attributes.

Now, the AD attributes are still updated even if one of the attribute elements
are bogus. This will make AD refuse to update the rest of the attributes, so the
AD sync now works more aggressively by adding each element in a single command.
This is slow, but should not happen that often.

CRB-363
Do not use ad_data for forwards data fetched from Cerebrum. Create a separate variable instead.
Add config for attributes from AD attribute table.

This is an unfinished configuration for AD attributes, and missing functionality
for it yet.
Add test constants through dbtools.
Fix adding test spread.
Merge remote-tracking branch 'origin/master' into CRB-363-multivalued-handle-exceptions

Conflicts:
	Cerebrum/modules/ad2/ADSync.py
Fix bug in deletion of temporary constants created by dbtools.
Bugfix for visibility in Exchange.

This should ensure that visibility is not set to a wrong value when
group additions occur.

CRB-411: -logisk-feil-i-synlighetsetting
Bugfix: Remove constant from _cache upon deletion.

This were found when working with automated tests, where creating and deleting
constants didn't work, as the constants were returned with their old, deleted
integer values.
Bugfix: Create copy of lists of accounts, persons and groups for removal.

The bug caused not every entity to be deleted, as the loop worked on the same
list as they were removed from.
Remove the creation of a new db connector for the AD mock client.
ent. hist. perms for EmailTargets. Email CL bugfix.

Postmaster should now be able to do entity history on EmailTargets.
Also, changelogging removal of filters should now result in
int(ChangeType) being stored in the change params, instead of the whole
ChangeType object.

CRB-351: -gi-postmaster-tilgang-til-entity
Reorganization of forward objects naming.
Fix bugfix from 366bf13: Copy elements, as they're sets, not lists.
Merge remote branch 'origin/master' into CRB-413-ad2-attributt-config
Add support for using Cerebrum's AD attribute table.

Cerebrum's AD attribute table has its first use case: Storing AD attributes that
should not change after they have first been set, and can only be edited
manually through bofh.

CRB-413