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
reorder methods
Add strategy manager
add OTMessage::processXmlSuccess

for refactoring only. Will be deleted later.
processXml uses OTMessage param, part 0
processXml uses OTMessage param, part 1
writeXmlXXX uses OTMessage param, part 0
writeXmlXXX uses OTMessage param, part 1
writeXmlXXX uses OTMessage param, part 2
rewrite usage of writeXml
Convert methods to strategy classes, part 1
Convert methods to strategy classes, part 2
format code
remove calling old methods