Part of the effort to remove the libevent dependency altogether, see #31194
This takes the Read and FindFirst functions from the HTTPHeaders class from #32061 and puts them into bitcoin-cli as free functions in a separate namespace with a TODO comment to revisit potentially sharing this code somehow. I played with picking the necessary commits and moving the HTTPHeaders class to common or something similar but I am not loving it so I am going with this route for now since it also decouples the two PRs.
Otherwise the change itself replaces the libevent-based HTTP client with a simple synchronous implementation which uses the Sock class directly.