Fixing issue with GPG key conflicts if defined in multiple places.

* Removed GPG virtual resource definition from params because it's unnecessary
* Fixed bug with use of $pubkey instead of $_pubkey
* Added a check to the GPG definition to ensure the GPG key is only defined once