Port LDAP code from EE

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Remove copyright

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Add ldap check in application_controller and internal api

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Fix ldap_user_auth_spec

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Remove non-exist method from ldap security check

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Add User#last_credential_check_at

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Add User#requires_ldap_check? method

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
 Merge branch 'ldap-code' into 'master'

LDAP code from EE
Merge branch 'master' of github.com:gitlabhq/gitlabhq