Moved all config to Admin interface and refactor

Hi,

Pretty massive change-set here as I reformatted the code during this change to fix all tabs and move away from k&r brace style. If this is too significant I can rework the source to format all to k&r or what you would prefer.
Onto what the patch does:

- All config is now in options in the Admin section (see attached pic).
- fixed a minor issue in the generic LDAP code (moved a check around)
- rebased to your latest code

Let me know what you think. 

![q2a-ldap-config](https://f.cloud.github.com/assets/152217/1268782/959749da-2ce8-11e3-9f17-c1bc0e2b1514.png)