Allow sync data to arrive via the chunked transfer encoding.

* Fixes #2216885
* The bug is that the sync adapters weren't set up to handle chunked
  encoding, primarily because 1) I hadn't seen any servers use it, and
  2) when we changed from HttpUrlConnection to HttpClient, support for
  chunked wasn't added (HttpUrlConnection didn't support it)
* The fix for xml data is trivial, since the Content-Length returned in
  the chunked case (-1) was being disallowed, but works perfectly well
  with HttpClient.
* The fix for attachments is less trivial, but still straightforward.
* With this change, we are no longer dependent on receiving content-length,
  which is highly desirable

Change-Id: Ie3bd6af0cf68f3afa190711d96b1dbd2e6341f79
1 file changed