slaveTryPartialResynchronization and syncWithMaster: better synergy.
slaveTryPartialResynchronization and syncWithMaster: better synergy.

It is simpler if removing the read event handler from the FD is up to
slaveTryPartialResynchronization, after all it is only called in the
context of syncWithMaster.

This commit also makes sure that on error all the event handlers are
removed from the socket before closing it.

himoca/redis,ksarch-saas/redis,spearhead-ea/redis,ramonsnir/redis,slfs007/mk-redis,maodeyi/redis_lua,HunanTV/redis,louisliangjun/redis,maodeyi/redis_lua,HunanTV/redis,ramonsnir/redis,slfs007/mk-redis,louisliangjun/redis,ksarch-saas/redis,ksarch-saas/redis,splitice/redis,louisliangjun/redis,spearhead-ea/redis,splitice/redis,spearhead-ea/redis,himoca/redis,ksarch-saas/redis,himoca/redis,splitice/redis,louisliangjun/redis,HunanTV/redis,splitice/redis,HunanTV/redis,maodeyi/redis_lua,slfs007/mk-redis,ramonsnir/redis