msm: rq_stats: Calculate load based on current freq limit

We are not using rq_stats any more so this commit is just for the
sake of completeness.  Prior to this patch, load has been calculated
based on an initial value of policy.cpuinfo.max_freq. This value may
change for several reasons: userspace settings, thermal throttling
(hello hammerhead!) or extended frequency tables where the absolute
maximum level is often not used during regular operations. This
results in unreliable calculations. Consider current policy.max to
fix this behaviour.
interactive: Set default screen off max freq @ 652800
kernel: Fix all leaks and cleanup

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: LaboDJ <jacopolabardi@gmail.com>
lowmemorykiller.c: convert to use for_each_thread

Signed-off-by: Paul Reioux <reioux@gmail.com>
introduce for_each_thread() to replace the buggy while_each_thread() (fix)

fix a merge derp. pointed out by neobuddy89

Signed-off-by: Paul Reioux <reioux@gmail.com>
lionheart: Change to module_init

* This will help fix the ordering.  This should be present because lionheart is not always default.

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
lionheart: Update cputime related code

Signed-off-by: Chet Kener <Cl3Kener@gmail.com>
Revert "introduce for_each_thread() to replace the buggy while_each_thread() (fix)"

This reverts commit 1170907bbbdfe5597bf235f5d8f787e0ba1fd448.
Revert "lowmemorykiller.c: convert to use for_each_thread"

This reverts commit a9e5d6a19caabd78264c45887b0b99d0aa21ae3f.