Some small improvements

Some improvements for QupZilla that I need them to fix some issues of TabManager plugin.
`m_lastActiveWindow` please :)