Allow limited looping requests in sync

* Microsoft has documented cases in which the server can continue to
  send MoreAvailable=true even when no new data is received.  This
  can cause looping behavior, which we stop when we recognize it.
* This workaround, however, can prevent the situation from resolving
  itself, and lead to delayed sync (up to a few hours has been noticed)
* In this limited CL, we allow the sync to loop up to a maximum number
  of times before stopping it forcibly.

Bug: 2685984
Change-Id: I2913b7e3438f6180c3c440508fab892176a06540
4 files changed