Added test to check whether a connection request is handled properly.
Created enum with all possible exit codes.
Moved some variables to their correct scope. Also, the connection handler function are invoked in a separate thread.
Now the connect request is handled in a separate thread, so the code has
been changed so that the buffer containing the data received over the network
were allocated manually instead of automatically.
All calls to exit() are now using BT_EXIT_* enums.
Automatically allocated buffer was being used from another thread, and
this might lead to a subtle bug where the memory can be overwritten at
the beginning of the next loop iteration, which results in a segfault.
Added UDP port to the list of forwarded ports so the app can tested in the VM.