wpa_supplicant_8 - Hostapd: Android related changes for sockets

Android related changes for socket handling.
Similar to ctrl_iface.c in wpa_supplicant/ctrl_iface.c

Ported from jellybean (was Change-Id: I3f72f5e4746ccdd007f647a923d41629afc17d94)
http://review.cyanogenmod.org/20317

Signed-off-by: Vishal Mahaveer <a0271468@ti.com>
Signed-off-by: Michael Bestas <mikeioannina@gmail.com>

Change-Id: Ibf95b753d60e47fa2e04d7b703c40851d2a13875