geo-rep: Fix the fd leak in worker/agent spawn

worker and agent uses pipe to communicate, if worker dies
for some reason agent should get EOF and terminate.

Each worker-agent spawning is done in thread, Due to race
if multiple workers in same node retain the pipe refs of
other workers. Hence agent will not get EOF even if
worker dies.

BUG: 1114003
Change-Id: I36b9709b9392299483606bd3ef1db764fa3f2bff
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/8194
Tested-by: Justin Clift <justin@gluster.org>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Venky Shankar <vshankar@redhat.com>