fix bugs: see commit detail

1.change max valid domain length from 254 to 253
2.domain search with last dot bug
3.invalid ipv6 validation,eg:2001:6a8:0:1:210:4bff
4.ip format when search ns by ip