Convert background page to event page

It's a Chrome recommendation to free up memory if the extension runs as background page that systematically performs some actions. See https://developer.chrome.com/extensions/event_pages#transition