intelli_plug: Optimize cpu_down and stop butchering

* In current scenario, if CPU is down locked, we try finding
  next unlocked CPU. This is wasteful; instead break the loop
  wait for next cycle if CPU is down locked.
* Also, add check whether CPU is being boosted or idle.
* Re-organize sequencing of checks before bringing down CPU.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
intelli_plug: Use wakeup_boost hint

* In current scenario, we boost (turn all cores online)
  whenever LCD turns on. This is really not required when
  we have good hotplug mechanism in place. The mechanism
  should detect load and put appropriate cpus online.
* Boosting CPUs each time will increase battery consumption
  (maybe not so much but we should prevent this)
* So boost CPUs and apply downlock only in two cases viz.
  hotplug was suspended and user requested wakeup_boost
  via cpu-boost driver from userspace.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
intelli_plug: Fixes for suspend/resume work rare issues

* It is observed that suspend_defer_time is not
  working as required. It should suspend as soon as defer
  time is completed. Therefore, make use of separate freezable
  workqueue to do this smoothly.
* Organize sequence for initiating and cancelling work.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
intelli_plug: Initiate suspend defer time with default value

* Thanks to @Dorimanx for notifying.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: intelli_hotplug: Fix build define

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
sched: Compute avg_nr_running for RQ Stats

* We already compute avg_nr_running for intelli hotplug.
* Let's make it available for conservative stats of MSM RQ as
  well.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Conflicts:
	kernel/sched/sched.h