NFS: showmount timesout on fetching export list

Bug: 1015184

Issue:  showmount timesout on fetching export list. Socket writev
        function is failing.
Cause:  XDR encoding of export list is failing. The calling function
        without checking the error returned by xdr_serialize_exports
        function is going ahead and writting into the socket causing
        the NFS process to hang. xdr_serialize_exports function returns
        -1 on error and message length on success.
Fix:    Caller should check if the function is returning -1 (error) or
        not before proceeding.

Change-Id: Ic3a5a9356e47b2ac938dd3e429cf2b71c0a0c715
Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-on: http://review.gluster.org/6030
Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>