[agent] clear agenda refetch interval on browser tab blur
Created by: adipasquale
visibilitychange
seems decently supported
https://developer.mozilla.org/en-US/docs/Web/API/Document/visibilitychange_event
https://caniuse.com/#search=visibilitychange
to test :
- open a calendar page, open the network tab
- clear network requests and switch to another tab
- wait 1m +
- go back to the other tab
- check that there was no request in between BUT that requests re-start
repeat test but staying on the same tab but leaving the agenda (eg by navigating to absences with turbolinks)