crypto: aead - Add type-safe function for freeing instances