Fix issue #2967969: Crash rotating screen on "delete account" dialog

- Have PreferenceActivity save and restore its header state.
- Keep track of the current header selection.
- When headers are updated, try to retain the current header selection.

Also fix issue #2995541: Cannot add new contact.  We were not allowing
fragment transactions in some cases.

Change-Id: I4aa4c703ed5f4ecf9f425cd7eeea4740c6360ce9
4 files changed