glusterfs: add gf_mkostemp api and use it instead of mkostemp of libc

Change-Id: Ia3d2f37ae1f7a7d87a75c82bedb4963729d45b6c
BUG: 764890
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/5004
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>