Revert "Fix runtime-errors from commit 714ab68fb6b6c1fb9a6e9e8aa484d2b56177851a"

This reverts commit bcc04b30e6e2f0dc7228f8c423395022184f5e54.
Handle failures in recieve_single() and receive_bulk().

If receive_single() fails, we can retry 3 times before giving up and
logging out about the failure and moving on.

Since receive_bulk() uses an array of JSON strings, it harder to re-try
them. As an ugly fix, we dump out the array line by line in log messages
and then clear the queue and move on.