Animate the badge popout, and add a delay before it closes

This makes the popout more usable: you no longer have to carefully
move the mouse cursor inside the popout area to select a link within
it.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>