Fix handling of rate limit & api key error conditions.

We now retry all responses 402 and above, except for the "invalid api key"
error, which we return as a 401 even though the BH API returns a 403 for that
error.