tryUntilSuccessful: Do not retry if error is 4xx (Client Error).
tryUntilSuccessful: Do not retry if error is 4xx (Client Error).

Initially, this code was checking only for 401 (Unauthorized) error.
But according to Tim we get either a 400 or 401 if realm is deactivated.

In the case where the API key is invalid, the server recently changed
from returning 400 to returning 401, in commit zulip/zulip@2adb0734d .

The first check ensures that the exception is thrown by our API
functions by checking for existence of httpError field.
To keep this code compatible with different server versions and also
because it makes sense, do not retry any 4xx error.  Since this error
is a "Client Error", just retrying it should never succeed.

Also add jsdoc.

vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile,vishwesh3/zulip-mobile