Fixing gpgme support for gpgme 2.0

The API in gpgme 2.0 is vastly different than 1.0. This keeps backward compatibility but adds 2.0 support. Also adds a fairly complete test script for sup/crypto

(From https://gitorious.org/sup/mainline/merge_requests/12 - just found it and thought I should copy across to here. Note I haven't reviewed or tested the change, just putting it in the system for now).