IdentityManager: Add ability to get accounts in the cookie jar

This CL adds an API to IdentityManager via which clients can obtain
the latest cached state of the accounts in the Gaia cookie in the cookie
jar, ordered by their order in the cookie jar. It serves as an initial
step to porting consumers of GaiaCookieManagerService::ListAccounts(),
although it intentionally provides only a subset of the functionality
(in particular, it does not indicate whether the cached state is known
to be stale).

https://docs.google.com/document/d/1hcrJ44facCSHtMGBmPusvcoP-fAR300Hi-UFez8ffYQ/edit?pli=1#heading=h.w97eil1cygs2
sketches out the approach for extending this API to give IdentityManager
the full functionality required to port all consumers of
GaiaCookieManagerService::ListAccounts(). We are holding off on adding
more functionality until we encounter use cases that require it.

Bug: 859882
Change-Id: I062a9ce036aa886f1c105913eb1a774471bb63f8
Reviewed-on: https://chromium-review.googlesource.com/1141951
Reviewed-by: Mihai Sardarescu <msarda@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576874}
3 files changed