cli: Fix xml output for volume status

The XML output for volume status was malformed when one of the nodes is
down, leading to outputs like
-------
          <node>
             <node>
               <hostname>NFS Server</hostname>
               <path>localhost</path>
               <peerid>63ca3d2f-8c1f-4b84-b797-b4baddab81fb</peerid>
               <status>1</status>
               <port>2049</port>
               <pid>2130</pid>
             </node>
-----

This was happening because we were starting the <node> element before
determining if node was present, and were not closing it or clearing it
when not finding the node in the dict.

To fix this, the <node> element is only started once a node has been
found in the dict.

Change-Id: I6b6205f14b27a69adb95d85db7b48999aa48d400
BUG: 1046020
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/6571
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
gfapi: Closed the logfile fd and initialize to NULL in glfs_fini

Currently if logfile is closed and other threads call gf_log
after glfs_fini() is executed, it may lead to memory corruption.
Adding gf_log_fini() which closes the logfile and initializes
the logfile to NULL, thus any further logging happens to stderr.
Also added gf_log_globals_fini() which should be filled in the
future to release all the logging resources.

Change-Id: I879163e1a3636e65300d166f782517ee773cab65
BUG: 1030228
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/6552
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
socket: unix socket connect path can't be greater than UNIX_PATH_MAX characters

Change-Id: I74788b63dd1c14507aa6d65182ea4b87a2e1f389
BUG: 1046308
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/6589
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>