IllegalStateException when changing orientation with parent-Fragment as targetFragment

Unless parent Fragment is retained, setting parent-Fragment as targetFragment will cause an IllegalStateException when changing orientation (or restoring from savedInstance), because the SimpleDialogFragment will be recreated before the parent has been restored.

This:

    mBuilder.setTargetFragment((Fragment) this, mRequestCode)

Will cause:

    java.lang.IllegalStateException: Fragement no longer exists for key android:target_state: index 1

Proposed solution: fallback first to parent-Fragment if no targetFragment is set, then fallback to Activity if SimpleDialogFragment has no parent-Fragment.