chore(security): converts ElggCrypto to service

This makes these methods possible to override in unit tests.

Fixes #6635