CCBC-497: Fix crash during retried HTTP request

The request_free_headers() function should set the headers field to
NULL, so that subsequent calls to the same function should only free
headers if they actually exist.

Change-Id: I4262331a664d1216f898aee49fb0da8a972a13b4
Reviewed-on: http://review.couchbase.org/40542
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
Reviewed-by: Subhashni Balakrishnan <b.subhashni@gmail.com>
Reviewed-by: Brett Lawson <brett19@gmail.com>