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

Related to PR #2010.

ramonsnir/redis,ttuna/msot-redis,slfs007/mk-redis,splitice/redis,spearhead-ea/redis,HunanTV/redis,splitice/redis,louisliangjun/redis,himoca/redis,himoca/redis,jxwr/redis,xuzhezhaozhao/redis_reading,spearhead-ea/redis,HunanTV/redis,ttuna/msot-redis,ksarch-saas/redis,splitice/redis,ttuna/msot-redis,jxwr/redis,louisliangjun/redis,MSOpenTech/redis,slfs007/mk-redis,darksideofthemoo/redis-histogram,darksideofthemoo/redis-histogram,himoca/redis,jxwr/redis,spearhead-ea/redis,MSOpenTech/redis,louisliangjun/redis,ttuna/msot-redis,slfs007/mk-redis,MSOpenTech/redis,ramonsnir/redis,ramonsnir/redis,HunanTV/redis,xuzhezhaozhao/redis_reading,xuzhezhaozhao/redis_reading,MSOpenTech/redis,xuzhezhaozhao/redis_reading,maodeyi/redis_lua,MSOpenTech/redis,darksideofthemoo/redis-histogram,maodeyi/redis_lua,ksarch-saas/redis,louisliangjun/redis,ttuna/msot-redis,maodeyi/redis_lua,HunanTV/redis,darksideofthemoo/redis-histogram,ksarch-saas/redis,ksarch-saas/redis,splitice/redis