fix #666 History Manager state not updated when replacing page

Updated HistoryManager to remove the URL check + added a UT.