Derive

C_DeriveKey() calls derive[EC]DH() which use OBJECT_OP_GENERATE in place of OBJECT_OP_DERIVE to create derived key objects, so it fails for attributes with ck3 checks. Fixed this in SoftHSM.cpp, cloned GENERATE into DERIVE in P11Attributes.cpp and added an unit test named DeriveTests.{h,cpp}. Tested with botan and openssl backend on my OSX dev box.