Improved performance of WebHistoryInterface

Use std::set to search in logarithmic time.