Minimal test suite

Hey guys,

I finally found some time to add the test suite we talked about. Right now, it's pretty bare but it should already cover the most important parts of the code. It's completely self-contained: the tests do not send any requests to the server and there are no real API keys in the code. Here are the current tests:

- Send a search request -> everything is OK
- Send a search request -> 1 server is down, but the second one is OK
- All servers down

I also realized I forgot to send you a fix I made last week (so my code probably wasn't working - sorry). Now, I only convert the response to utf8 once all chunks have been received.

There are many other things I'd like to work on, I'll open issues so we can track that.