MainNotebook class introduced
Logic of adding/switching and closing tabs is moved there
Refactored use of link emma.current_query to self.query in QueryTab actions as they rely on specific tab and not current