libgfapi: Wait for GF_EVENT_CHILD_DOWN in glfs_fini()

Whenever glfs_fini() is being called, currently no
check is made inside the function to determine whether
the child is already down or not. This patch will wait
for GF_EVENT_CHILD_DOWN for the active subvol and
then exits.

TBD:
Apart from the active subvol, wait for other CHILD_DOWN
events generated through operations like volume set in
future.

Change-Id: I81c64ac07b463bfed48bf306f9e8f46ba0f0a76f
BUG: 1153610
Signed-off-by: Anoop C S <achiraya@redhat.com>
Reviewed-on: http://review.gluster.org/9060
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>