Refactored to be able to expose HTTP status codes

To be able to implement HTTP HEAD, we need the HTTP status code. I did some refactoring (split up in hopefully small enough commits), and finally added code for HTTP HEAD and ElasticSearch functionality to check if index exists. I set up a testsystem on a Raspberry Pi, and as g++-4.6 (c++0x) is the default compiler on it, you will also find a couple of compile-fixes for that compiler version included in the first commit.