port background requests to monitor how long a user stays on a page

ported from liqd/adhocracy#285 for #167