implement addrbook_replace_entry to fix a leak