SOFTHSM-88: Accept NULL_PTR for pTemplate in C_GenerateKey

The changes are also applied to C_GenerateKeyPair, but all those mechanisms require some attributes as part of the key generation process. The difference is that it will return CKR_TEMPLATE_INCOMPLETE and not CKR_ARGUMENTS_BAD.