Ported some changes of the trunk version of this file.

References #629.
Added $config:max-inactive-interval-in-minutes variable.

References #586.
Merge pull request #6 from claudius108/master

Added the code for longer timer