Deduplicate adapter-of-installed-packages code.
Also had a shit ton of derps I needed to sort out

Change-Id: I454ba79eddaaff86233a2cc341f4c8bebe94729e
Signed-off-by: Anthony <Disciple3603@gmail.com>

Conflicts:
	src/com/android/settings/cyanogenmod/PackageListAdapter.java
	src/com/android/settings/headsup/HeadsUpSettings.java