Return a linked list of AddressInfo objects,
instead of using an array of these objects as an output parameter.
This simplifies the code in callers of this function (especially
TSan).
Fix a few memory leaks from internal allocator, when the returned
AddressInfo objects were not properly cleared.
who is deallocating next?