Don't create duplicate identities. LP 1180914.

When adding a new identity, replace any existing identity with the same nai.
Provide appropriate confirmation dialog if gui is available.
Make identities.txt private to the current user. LP #1291476.