History dialog should show results from visits table
Splitting this out from #831 (closed). Our history database is divided into hosts table, URLs table, and visits table. The hosts table tracks the number of times a host (e.g. example.com) has been visited. The URLs table tracks the number of times a particular URL (e.g. https://example.com/example) has been visited and also the last visit time. Only the visits table tracks all visits to a URL. Because the history dialog uses the URLs table, and the URLs table only tracks the last visit to that URL, the history item therefore disappears from the original history and jumps to the top of the page.
Chrome tracks all visits to a URL. I presume Firefox does too, but haven't checked. I kinda think we should probably display all visits. Of course, this change would cause far more history items to appear in the history dialog, but that's probably OK since we're already saving them all anyway.