keyboxd: Fix duplicates when listing keys by uid.
* kbx/backend-sqlite.c (struct be_sqlite_local_s): Add fields lastubid_valid and lastubid. (run_sql_prepare): Add optional extra2 arg and chage callers. (run_select_statement): Add an ORDER BY clause to most SELECTs. (be_sqlite_search): Skip duplicated keyblocks in a search.
See the comment in the code for the background.
Beware: This change lets tests/openpgp/key-selection.scm fail. Needs
to be fixed.
- Signed-off-by: Werner Koch <wk@gnupg.org>