anetPeerToString() refactoring and more explicit checks.
anetPeerToString() refactoring and more explicit checks.

Related to PR #2010.

JackieXie168/redis,JackieXie168/redis,JackieXie168/redis,JackieXie168/redis