gpg: Pass CTRL to many more functions.
For proper operations as a server we need to avoid global variables.
Thus we need to pass the session state CTRL to most functions. Quite
a lot of changes but fortunately straightforward to do.
- Signed-off-by: Werner Koch <wk@gnupg.org>