Bug 981727 - Part 1: Centralize key generation and serialization in StateFactory.

This is still awful, but at least it's one place to update instead of
several.
Bug 981727 - Part 2: Prepare for State version bump.
Bug 981727 - Part 3: Bump State to version 2.

V2 is identical to V1, except that all V2 key pairs are DSA, where-as
all V1 key-pairs are RSA.  We migrate existing serialized State objects
when they are de-serialized; a subsequent write will write the current
version (with the migrated values).
Bug 981727 - Part 4: Add logging to StateFactory.migrateV1toV2.
Bug 981827 - Make Android and Desktop FxAccounts client use same key parameters. r=rnewman