[LIBS] netstack: Added socket API interface and implemented it for lwIP

Signed-off-by: Anup Patel <anup@brainfault.org>