Initial Contribution
Code drop from //branches/cupcake/...@124589
auto import from //depot/cupcake/@137055
auto import from //depot/cupcake/@132589
auto import from //depot/cupcake/@135843
auto import from //depot/cupcake/@135843
Merge commit 'remotes/korg/cupcake' into cupcake_to_master
Merge branch 'open_source_no_contributions' into google_internal
Merge donut into master
Add license-related files

BUG=1573996
am 58fb7313: Add license-related files

Merge commit '58fb7313fe53a7ce5fb153e79560719e06058a4b' into eclair

* commit '58fb7313fe53a7ce5fb153e79560719e06058a4b':
  Add license-related files
merge from donut
merge from open-source master
android-2.1_r1 snapshot
reconcile android-2.1_r1 snapshot
reconcile main tree with open-source eclair
am c5718a3d: reconcile main tree with open-source eclair

Merge commit 'c5718a3d3d1786d57998315641361809d8f03e79' into eclair-plus-aosp

* commit 'c5718a3d3d1786d57998315641361809d8f03e79':
  android-2.1_r1 snapshot
Implement proper multihoming support, so if one server fails for whatever reason
(including timeout), we'll fall back to the next.

Also includes one patch from upstream, in that timeouts are converted from
Java's exception hierarchy to our own exceptions.

Here's an example tcpdump from a fake checkin server with both AAAA and A records,
where the IPv6 connectivity is deliberately broken to demonstrate the effects of
this patch:

  11:49:28.202620 IP6 2620:0:105f:a:223:76ff:fe8d:3a3c.37109 > 2001:700:300:1880::2.80: S 24035192:24035192(0) win 5760 <mss 1440,sackOK,timestamp 1110775 0,[|tcp]>
  11:49:31.211370 IP6 2620:0:105f:a:223:76ff:fe8d:3a3c.37109 > 2001:700:300:1880::2.80: S 24035192:24035192(0) win 5760 <mss 1440,sackOK,timestamp 1111075 0,[|tcp]>
  11:49:37.211186 IP6 2620:0:105f:a:223:76ff:fe8d:3a3c.37109 > 2001:700:300:1880::2.80: S 24035192:24035192(0) win 5760 <mss 1440,sackOK,timestamp 1111675 0,[|tcp]>
  11:49:48.216299 IP 74.125.57.33.58205 > 129.241.93.35.80: S 2632654863:2632654863(0) win 5840 <mss 1372,sackOK,timestamp 1112775 0,nop,wscale 1>
  11:49:48.216324 IP 129.241.93.35.80 > 74.125.57.33.58205: S 3149921981:3149921981(0) ack 2632654864 win 5792 <mss 1460,sackOK,timestamp 62633484 1112775,nop,wscale 8>
  (...)

and then the HTTP connection proceeds as usual.

I intend to push this fix upstream once we get it reviewed and committed locally.
Revert "Implement proper multihoming support, so if one server fails for whatever reason"

This reverts commit ceab342827538782a715a10e5030a222700895ce.
Implement proper multihoming support, second attempt.

This patch makes our HTTP client multihoming-aware, so if one server fails for
whatever reason (including timeout), we'll fall back to the next. It's a bit
more complex than the first attempt, but we're hopefully not breaking SSL
connection (incl. checkin) anymore.

Also includes one patch from upstream, in that timeouts are converted from
Java's exception hierarchy to our own exceptions.

Here's an example tcpdump from a fake checkin server with both AAAA and A records,
where the IPv6 connectivity is deliberately broken to demonstrate the effects of
this patch:

  11:49:28.202620 IP6 2620:0:105f:a:223:76ff:fe8d:3a3c.37109 > 2001:700:300:1880::2.80: S 24035192:24035192(0) win 5760 <mss 1440,sackOK,timestamp 1110775 0,[|tcp]>
  11:49:31.211370 IP6 2620:0:105f:a:223:76ff:fe8d:3a3c.37109 > 2001:700:300:1880::2.80: S 24035192:24035192(0) win 5760 <mss 1440,sackOK,timestamp 1111075 0,[|tcp]>
  11:49:37.211186 IP6 2620:0:105f:a:223:76ff:fe8d:3a3c.37109 > 2001:700:300:1880::2.80: S 24035192:24035192(0) win 5760 <mss 1440,sackOK,timestamp 1111675 0,[|tcp]>
  11:49:48.216299 IP 74.125.57.33.58205 > 129.241.93.35.80: S 2632654863:2632654863(0) win 5840 <mss 1372,sackOK,timestamp 1112775 0,nop,wscale 1>
  11:49:48.216324 IP 129.241.93.35.80 > 74.125.57.33.58205: S 3149921981:3149921981(0) ack 2632654864 win 5792 <mss 1460,sackOK,timestamp 62633484 1112775,nop,wscale 8>
  (...)

and then the HTTP connection proceeds as usual.

I intend to push this fix upstream once we get it reviewed and committed locally.