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
Merge pull request #314 from mhamrle/simplify_code2

simplify code 2
add checks to printf-like methods
fix printf-like formats