A TCP FIN message is passed on to user apps as a tcp_received_callback
with a NULL pkt parameter. This means the connection is closing and
the app should do whatever cleanup it needs as there will be no further
callbacks for the current TCP connection.
Currently, if a HTTP client request doesn't receive a "body" which
the HTTP parser can use to trigger on_message_complete, then the request
will end up timing out and most apps will think an error has occurred.
Instead, let's handle the TCP FIN message and return the waiting
semaphore, leaving the app to deal with whatever has been set in the
current HTTP context response data (IE: http_status).
This fixes using HTTP client to send POST data to servers which
only respond with HTTP_OK status and no body.
Signed-off-by: Michael Scott <michael.scott@linaro.org>