fix(headers): bug in curl header list management

unique_ptr deallocated the list after appending.