Add custom allocator support using the realloc() interface

Signed-off-by: Alejandro Mery <amery@geeks.cl>
Use custom allocator

Signed-off-by: Alejandro Mery <amery@geeks.cl>
Introduce lws_free2() helper to free and re-NULL pointers

Signed-off-by: Alejandro Mery <amery@geeks.cl>