getlantern/lantern#1850 Improved logic for determining idleness, increased test coverage