Commit c58085b4 fixed a bunch of things, but it also removed checksfor invalid timeout values. It turns out we need to check for those,because the action will be initialized (with invalid timeouts)whether or not it actually gets loaded for the current profile.
The absence of these checks caused unintentional screen turn-offfor many people, ironically when they did not enable automaticscreen turn-off in the first place.
We prevent bad timeout registrations by interpreting negative valuesin m_idleTimeoutWhenUnlocked as "idle timeout disabled". Checks forthis value ensure that registerIdleTimeout() is only called whenthe action is loaded, regardless whether it's triggered by thescreen locker changing its activation status, resume after suspend,or any other event.
Theoretically, we could have also moved some signal connectionsinto loadAction() and disconnected them in onProfileUnload().Checking on every registration call seems more robust though.
This commit also adds a little bit of logging to make futuredebugging of DPMS issues easier.