Refactor code to work with OpenPGP.js v0.5.1

OpenPGP.js v0.5.1 includes critical security fixes after Cure53 audit.