Make request line parsing more robust

- Break up a gnarly function for parsing requests and opening a
  socket.
- Explicitly handle some error cases.
- Document where the request handling is not spec-compliant.
- Add unit tests.

Bug: 15324060

Change-Id: I7f7b2dbb3820745c217fcd6a4507d36bab1f1edb
7 files changed
tree: fd450ccbb234227b98f6860252e68ead9fca395a
  1. comm/
  2. res/
  3. src/
  4. Android.mk
  5. AndroidManifest.xml
  6. proguard.flags