Fixing some more broker quirks and adding MIT License

1. The main thread now also does the broker work
2. Fixed issues with closing the pipe file descriptors correctly
3. More code cleanups
4. Adding a LICENSE
5. Added a debug make target , we can now do "make debug"
Merge branch 'master' of https://github.com/eerpini/N-way-Pipe