Improved error handling of oonibclient

It's counterpart is in https://github.com/TheTorProject/ooni-backend/pull/52
Oh right, sorry I missed that. Should do these reviews when I have slept more. For the rest it looks good. Merging.