Fix write operation on non I/O thread

The write operation is allowed to execute on I/O thread.
Integrates EncodeBuffer and DecodeBuffer

Write operation and read operation is required for both load stage
and store stage. Use CodecBuffer to encode and decode objects in
stages.