Fix the snippet that gets the max uidNumber from LDAP

Since python-ldap does not sort the results, [-1] does not always return what
we expect, thus we need to use max() to get the expected result