Move LDAP timeout code to Gitlab::LDAP::Access
Cache LDAP check in Gitlab::UserAccess

This changes the number of LDAP calls when users access GitLab via
Git-over-SSH or the API. LDAP check results are cached for 1 hour.
Add a spec for User#requires_ldap_check?
Skip LDAP cache check when LDAP is disabled
Merge branch 'ldap/cache_check' into 'master'

Cache LDAP check everywhere

See merge request !1008