Authenticate LDAP users in the grack module

Resolves issue #2012 and updated PR for #2557 based on current master (5).

As discussed in #2557, it would be useful to have a general purpose omniauth/devise solution, but that is not a simple solution.  The devise and omniauth flow don't appear to be designed for non-web authentication flows.  Also, workarounds, or token based flows would have to be implemented for oauth like systems where devise or omniauth do not receive and process the user password.  A new issue should be created to address these concerns.