Fix switching running/cached apps with memory bar

Fixes upstream issue #38735
http://code.google.com/p/android/issues/detail?id=38735

Ported from CM10
http://review.cyanogenmod.org/25775

This patch is already submitted to AOSP. No feedback from them yet.
https://android-review.googlesource.com/45993

Change-Id: I484e30d3fd4f5425e174911ae22bb2def170e6b8
Merge "Fix switching running/cached apps with memory bar" into cm-11.0