ldapBackend.py: Do user.save() after user-create's add-group

* When a user doesn't exist and needs to be populated from ldap, the
  user.save() is located inside the conditional code for setting
  LDAP_AUTH_GROUP. This commit moves it after that so the save() always
  happens (even if LDAP_AUTH_GROUP is set in settings.py it might bork
  before the save() if the group doesn't exist).

* Also moved it and the user.is_active assignment to after the
  "user-exists" try-except block, to be more DRY
Merge pull request #68 from rowanthorpe/fix-ldap-user-creation

ldapBackend.py: Do user.save() after user-create's add-group

LGTM. As a side note, I will be visiting this backend a bit more soon. I already got some unit tests for it and will try to increase them both to increase code coverage as well as traverse unvisited code paths to expose bugs. Thank you
LDAP authentication unit tests

Using mockldap, add user authentication unit tests with LDAP backend
Also fix a corner case with the filter not having parentheses in the
ldapBackend which had mockldap complain.
Fix bug in ldapBackend with LDAP_AUTH_GROUP

If LDAP_AUTH_GROUP was not defined in settings, ldapBackend would
raise an Exception making authentication impossible. Fix it using the
canonical way of checking for dictionary key existence
DRY optimization in ldapBackend

Just some simple code deduplication
Add some extra LDAP auth unit tests

A bad login
A not correctly created user but correct password
A malformed user
Fix regression with settings and LDAP_AUTH_GROUP

Introduced in 8af59df, it was NOT the canonical way of checking
check both codepaths when using LDAP auth

Both for an existing as well as a non existing user
Improve app-path setting in Apache wsgi file

* Use var for easy app-path configurability/reuse
* Only append app-path to sys.path if it isn't already there
Fix copyright notice in Apache wsgi file

* update copyright year
* s/ISC/THE AUTHOR/
Improvements to Apache wsgi file (esp. maintenance mode)

* switch to maintenance mode when Apache is reloaded and
  "_maint_mode == True" (in non-maintenance mode server reload/restart
  has an infinitesimally small added cost of one var-assignment and one
  if-branch, but actual requests have no extra overhead at all - the
  "application" function is unchanged in the commit)

* set _app_path and _maint_mode vars at top of code and label them for
  editing

* label _maint_file at top of maintenance-specific code for editing (if
  a custom page is being used)

* add commented-out (non-default) version of maintenance mode handling -
  to dynamically handle maintenance page changes without
  server-reloading (but doesn't use inotify/etc, because doing that
  portably without sourcing Django libs is too complex to be worth it) -
  for speed-reasons, it uses global vars instead of arg-passing