Detect and handle IPInfoDB errors.

This is mostly to avoid invalid IPs raising a cryptic JSON ValueError (since
the API suddenly decides to not return JSON any more if it is reporting an
error, why?!).