Add HttpRequest / CurlRequest / BadHttpResponseMapper

- Move Exception to its own file
- Use BadHttpDatabaseResponseException and add BadHttpResponseMapper
- Start to use HttpRequest / CurlRequest instead of relying on curl_* calls
- Some tidy
Merge pull request #354 from SemanticMediaWiki/sparql-http-request

Add HttpRequest / CurlRequest / BadHttpResponseMapper