Disconnect all signals when destroying a tab widget

This should stop delayed callbacks from being delivered to a tab while
it's being destructed.

Setting all mebers of the tab to None is a hack to avoid memory leaks.
Fix for app minimizes on plugin close in windows.
Renaming of *plug/s to *plugin/s.
Refactoring of tab_state_change
Use workaround if PyQt is missing the parameterless disconnect() overload