g10: Be careful to not be in a transaction during long operations
* g10/tofu.c (begin_transaction): New parameter only_batch. If set, only start a batch transaction if there is none and one has been requested. Update callers. (tofu_suspend_batch_transaction): New function. (tofu_resume_batch_transaction): Likewise. (ask_about_binding): Take a ctrl_t, not a tofu_dbs_t. Update callers. Gather statistics within a transaction. Suspend any batch transaction when getting user input. (get_trust): Take a ctrl_t, not a tofu_dbs_t. Update callers. Enclose in a transaction. (tofu_get_validity): Use a batch transaction, not a normal transaction.
- Signed-off-by: Neal H. Walfield <neal@g10code.com>