Merge changes I1abd671f,I9ae61465

* changes:
  adb: don't close sockets before hitting EOF.
  adb: implement fdevent_set_timeout.