XWIKI-9577: Improve Crypto API for full PKI support

- Add support for storing Certificates, Private keys and Signatures into xwiki.

(cherry-picked from commit 3bc17e4a0bd42c0cdb1544143c80187c3b74fe25 on master)