This commit fixes an issue observed with SimpleLink sockets with
multiple definitions of `gethostname` function. So far, the definition
within `socket.h` was not visible when offloading was enabled.
As this is no longer the case, and SimpleLink partially uses POSIX
subsystem, builds for this platform resulted in compilation error.
The issue was fixed by moving `gethostname` declaration in unistd.h
inside the `#ifdef CONFIG_POSIX_API` block.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>