Merge pull request #1 from frodegill/master

Do not fail when calling search() rapidly
Prepare for refactoring. Also some g++-4.6 (default g++ on Raspberry Pi) compile fixes
Start of refactoring
Refactored parseMessage and readMessage
Prepare to refactor readMessage(std::string)
Refactored readMessage(std::string)
Prepare to refactor request
Refactored request
Refactored get/put/post/remove/rawpost
Finally able to add HTTP HEAD, to be able to test if index exists