Moved duplicate code into new function OTClient::setRecentHash.
Extend OTClient::setRecentHash to refactor more duplicate code.
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.
Use const arguments for processServer*.
Merge pull request #328 from benma/processserverreply

OTClient: more refactorings
simplify code