kex: fix libgcrypt memory leaks of bignum

Fixes #168.
4 files changed