Use shared_ptr for OTMessage to fix a memory leak.

A unique_ptr can be used instead as soon as some implementation details
of OTCLient/MessageBuffer are fixed.