Fix sensitive data not being cleared from memory by memset.

The compiler will optimize away memset calls for memory locations that
are not 'used' anymore after the memset. ( see: http://goo.gl/y8311 )
Implement secure_memzero function that is guaranteed to zero the
memory location and use it in all critical cases.