Avoid extra copy of buffer when encoding

This patch make a specialized structure simulating inheritance to
avoid the usage of OCTET_STRING_fromBuf that makes an internal copy
of the buffer. This class maps and unmap the buffer updating the
proper pointers to the internal data to avoid copying it twice.

Change-Id: I2462e3c08fd719931c1c684bdf8b21d6be046500