Replace LDAP exclusive lease with state machine
Part 1 from https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/500
This only replaces the exclusive lease with a state machine. There needs to be a bit more work to support the single group syncing after this, but it paves the way. Replacing the lease will also help support a lot!