Proper handling of cancel in getaddressinfo()

Signed-off-by: Martin Sustrik <sustrik@250bpm.com>