Fix the memory leak caused due to merge#667 in websocket_main
1) websocket_main() allocates memory for input
2) calls websocket_client() api and passes input as argument
3) websocket_client returns without freeing the input due to error cases
4) websocket_main does not handle this case due to merge commit id #667
Fixed the same as follows
1) Removed the freeing of allocated memory for input inside websocket_client and websocket_server
2) Added pthred_join to wait until the child thread finishes
3) During exit of main thread, take care of releasing the allocated memory
Signed-off-by: pradeep.ns <pradeep.ns@samsung.com>