fd: Improve read_pattern(), rename it to read_and_compare().
The old name was a poor choice because the pattern argument actually
is neither a regular expression nor a filename pattern.
More importantly, the function receives a buffer size and tries
to read this many bytes but then compares only the first part of
the received buffer to the expected string. This is a rather weird
calling convention.
The only two callers are the http sender and receiver which both
call the function during the initial handshake where no other data is
available. Thus we can change the function to read only the minimal
amount of data (length of the expected string), and drop the bufsize
parameter.
Remove the unnecessary log message in the error case and streamline
the documentation while at it.