Add ipv6 support

Let server listen on ipv6 address, tested with libev client on both ipv4 and ipv6 address.