nfs: handle stable write with @flags rather than fsync()

stable writes can be "made stable" by simply setting O_SYNC (or
O_DSYNC, accordingly) in the write flags or fd->flags. Performing
fsync() at the end of the write is extremely inefficient and completely
messes up eager-locking logic in AFR.

Change-Id: I4d954c133641e246b2ab4df874bad0282667561f
BUG: 916372
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/4591
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>