socket: convert socket functions to file scope (static)

The function names used in socket.c conflict with Samba's
socket functions (samba.git/source4/lib/socket/socket.h). Convert
our functions to file scope as they are anyways not called across
files.

Change-Id: If98ae557d3e2868f257c021b283ede6a5e92de02
BUG: 953694
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/5104
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
api/Makefile: link api.so against libgfapi (and dependencies)

Samba opens vfs_gluster.so with dlopen(..,RTLD_LOCAL). This makes
the symobls in the shared module and the library it exclusively
links against (specifically gfapi) not resolvable from the .so
files which are opened in turn within (like xlator .so files)
unless explicitly linked against the dependent libraries.

This is not otherwise required in case of glusterfsd as the main
executable symbols are always available for resolution from
dlopen()'ed shared objects, making Samba's vfs_glusterfs
requirement unique, but luckily not incompatible.

Change-Id: I894c521daade7d46ec5bf07793f2eea02ebc9700
BUG: 953694
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/5105
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>