Improve UI pref when sync/cancel account syncs.

The core of the change is in ManageAccountSettings#showSyncState(). New
code caches as much information as it can. And break out of loops as
early as possible.

Bug: 28575620
Test: make RunSettingsRoboTests
Change-Id: I076ce148e3d8db55f6cadfd9491f037f7a55a986
5 files changed