PEP8 compliant; remove legacy unused code; bugfixes Special thanks to Chyssler for pointing them out
Handle the case when an LDAP user's group doesn't exist in LDAP.
Giant rollup commit in preperation for 8.0-RC4