Improve ldap support

Added ability to specify bind username and password.
Search for users better.  Use ldapdn as the basedn to start searching.

Added ldap_cacertfile parameter to better support ldaps.
According to README, this is what capath could be used for, but I didn't see where this is implemented.