Fix a couple mistakes in ghost tab handling

Remove useless check in mouseleave handler. Also when closing a tab,
check that the tab bar is indeed hovered before adding a ghost tab, as
the tab could have been closed with the keyboard.