Added saveHistory and loadHistory methods to WebPage, which are now used for reopening tabs.
New tabs are now opened in their previous index.