Ported fixes: 332, 317, 318, 330
[rmcardle] Fix issue MR-332 - Can't select different tab with one click after disconnecting existing tab
[rmcardle] Fix issue MR-317 - Difficulty right-clicking on Tab
[rmcardle] Fix issue MR-318 - Wrong tab gets selected when tab names overflow on the tab bar
[rmcardle] Fix issue MR-330 - Portable version saves log to user's profile folder