Actually add 'bind' call in the server.
- Server still worked with a "random" port before this.
- Fix client side recv_thread loop to exit when server is shut down.

To Do:
- Add library (like threadpool) to do local thread communication over
  UNIX sockets

Signed-off-by: Sandeep Patil <psandeep.s@gmail.com>