Merging #1565 Provide a signed OS X package

Add the flag to productbuild to sign the resulting .pkg/.dmg, and the conditional code to make sure it only comes into play when available/required. In addition to this code the required certificate and private key need to be in a keychain on the signing system and visible to the signing process.