[hm] Auto Lid Timeout & Code Cleanup

Using _derivFilt to track and automatically determine best time to exit
the lid open logic
Some code cleanup and additional places using the _maxPidOutput