Reset context when context finished and on failed Assuan transaction
When the context finishes (with an error) then we cannot reuse it for
another Assuan transaction. We must reset it so that a new context is
created when starting a new Assuan transaction. And when starting a new
Assuan transaction failed with an unknown error then we also need to
reset it so that we don't try to cancel the context when the
DeviceInfoWatcher is destroyed when exiting the application.
BUG: 450824
(cherry picked from commit 45da709f4ca614abdb6aed0603f7eb378c6b266c)
- GnuPG-bug-id: T6688