Move functions dealing with ipaddr_t and range_t to ipaddr.c.