The HTTP stack had grown into a single file that owned sockets, parsing,
uploads and every API domain. Split it into focused modules (listener,
response stream, upload, json helpers) with the domain handlers next to the
APIs they serve, and cover framing, streaming and uploads with unit tests.