Add Performance and memory management to AOSPA (from CM) based on this commit: https://github.com/mateor/android_packages_apps_Settings/commit/037ea72dba65e667ab06ceaf6b1e25a1d7aec2a8

Change-Id: I76f524dd3d1e39c4756f8dcf25cfd46f6b484985
include erveryting from prevoius commit

Change-Id: I3e1172060e88baed9907b9bf8fe3d9e978d5736b
fix merge errors

Change-Id: Idbbabacfb3a7e2b321ba5ce026da69d5228013ae