Allow creating custom dialogs in DialogPreference.

This allows creating non-AlertDialogs while still using the click and
state handling of DialogPreference.

Change-Id: I54fd7d6d6b9f6a49fef1ae95e0178838b3edfa56
Merge "Allow creating custom dialogs in DialogPreference." into cm-10.1
Merge remote-tracking branch 'upstream/cm-10.1' into HEAD