Added (untested) device connection support using libpcComm, fixed bugs

Bugs fixed :
- when closing a tab, it was closed twice
- added enable/disable of menu items depending on tab count