Replace 'unstable' memset occurrences with secure_memzero.
Completes some missing cases from the previous commit and additionally
covers cases where memset would be optimized away if the compiler
inlined the function it was used in.
Securely zero context memory in the ctx_free functions.