In order to find the validity for a crypt_key_t, the code has to loop
through the key->kobj->uids list up to the correct index. This is a
bit silly since the uid is available when the crypt_key_t is created in
get_candidates().
This patch adds a validity field, and changes the various places to use
that instead of looping.
Also fix a bug in _crypt_compare_trust(): it was using the validity of
the first uid instead of the corresponding uid's validity.