Clean up lockscreen target configuration code (1/2)

Get rid of a lot of duplicated code.

Change-Id: I80fb0b0cd9b5f7d79a5760f8fa6ae338d9ca7205
merge changes from CyanogenMod 10.2 into local branch

Conflicts:
	policy/src/com/android/internal/policy/impl/keyguard/KeyguardSelectorView.java

Change-Id: I6ddd6d66527917d9d0b12321bb0289ea02c966a9