apphook: remove unused unregister_application_hook

Signed-off-by: Juhasz Viktor <jviktor@balabit.hu>
crypto: don't cast locking callbacks explicitly

In order to get type safety from the compiler, avoid an explicit cast and
fix the function prototype to match the OpenSSL expectations.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>