Memory Leak Fix for Codec::GenerateWriteKey

Using std::auto_ptr as requested. Added <memory> include to header.