replace homegrown bin<->text routines with addrconv for mac and ipv6
use bytes instead of int to represent ipv4 addresses

change ipv4 representation from int to bytes in many places.
replace homegrown bin<->text routines with addrconv for ipv4.