Bound the sync queue retries

Limit retries. Add a test.

Added a 5-attempt limit with exponential backoff. Both tests pass.

Ready for your review.

Edited 1 file+1 −1