Only cancel syncs for non-existent accounts

updateRunningAccountsH() should check syncs against all accounts
on the device, not only running accounts.

Also add code to restore wrongly-canceled periodic syncs, saving
users from a bad state where the only alternative is to remove and
readd affected accounts.

Bug: 27733283
Change-Id: I96bce87571c3b7c6cd1934cc967f11257f891f55
2 files changed