Fix segfault when closing the application after a tab has been split

Also improve new split size (do not reuse previous tabs)

THIS REQUIRE TO UPDATE pyqode.core TO THE LATEST commit on the master branch