Replace calling python hash() by hashlib.sha1()

Apparently the hash() function of python can return a different integer for a same string if
started from different process. For nuancier that meant that while logged in there was case
of user getting different ordering of the candidates, which is rather annoying.

So here, we convert the string to SHA1SUM, takes the hexadecimal output, convert it to an
integer and only takes the first few characters to avoid giving the seed a number too high that
might slow down the seeding.