Register a tab visit only after 500ms without timers.

Continuation of #1249.

Instead of using timers, this switches to calculating the difference in time between each call of the `chrome.tabs.onActivated`/`chrome.tabs.onRemoved` listeners. This has a couple of advantages:

* we're not relying on `setTimeout`, which is notorious for being inconsistent with how long it actually takes to fire.
* the code path is more linear, since everything is done as part of a callback from one of `chrome.tabs.onActivated`/`onRemoved`/`onReplaced`.

This also changes how we test it:
* we have to modify `TabRecency.lastVisitedTime` after each `TabRecency.add` to ensure enough time has elapsed. (Although I guess we could stub the `Date` constructor?)
* we can now (though I haven't) add tests checking that tabs not visited for enough time are not registered, something that wasn't possible before.
It looks to me like you can replace 289-293 with

    @current = @lastVisited = tabId
    @lastVisitedTime = currentTime

Every tab will get a score; you don't need to force it:
- The current tab gets `0.0`.  Tabs *without* entries in `@cache` get a bit higher score (because of `@cache[tabId] ||= 1`), and tabs *with* entries in `@cache` get higher scores still (because the first `@timestamp` we use is `2`.

(Or perhaps I'm misunderstanding your intent.)