Fix Home/Menu/Back keys' unlock

Change-Id: Id2bf457261619f64cf8717e2f18cf9775159921a
am: Allow more hidden apps on devices with lots of RAM

 * If more than 1.5GB is present, allow up to 40 hidden apps.
 * Number is somewhat arbitrary, but was found to work well on D2.
 * Also look at the sys.mem.max_hidden_apps value if given.

Change-Id: I2d3cf6e0dad1bc0b482cc37bf9c61ed2f2b4be52
Merge "am: Allow more hidden apps on devices with lots of RAM" into cm-10.1
Merge "Fix Home/Menu/Back keys' unlock" into cm-10.1
Merge remote-tracking branch 'CM/cm-10.1' into cm-10.1

Conflicts:
	services/java/com/android/server/am/ProcessList.java