Adaptive Case 20477: read_tcp_reply, Mismatching protocols

There is a "double close" error when close_conn() is called
before returning from svr_is_request() and then again in
start_process_pbs_server_port().  The result is that, on a
busy server, the file descriptor gets reassigned between the
subsequent closes and the close_conn() in
start_process_pbs_server_port() ends up closing an active
client connection.

Also: Replace strerror() with thread-safe strerror_r()
      Replace log_message with log_buf for consistency.