[misc] Typos
XWIKI-9577: Improve Crypto API for full PKI support

First steps, in progress.

- Remove usage of deprecated methods
- Avoid registering the BC provider
- provide BC provider using a component
- refactor x509 test to test the public API, not internal classes directly, and use Mokito

Note: This commit does not change anything to the public API, except the potential side-effect that it does not register the BC provider anymore.