WorkSource: Add support for chaining attribution.

WorkSource objects now hold references to zero or more WorkChain
objects, each of which represent a "chain" of attribution.

This change also changes most WorkSource APIs to be able to
deal with WorkChains. Several APIs do not necessarily make sense with
WorkChains and have been left unmodified :

- boolean diff(WorkSource): Does not account for WorkChains for now.
  This is a public API so we shouln't change it unless we decide to
  make WorkChains public.
- setReturningDiffs(WorkSource): Used internally only, will be removed
  in a future change.
- addReturningNewbs(WorkSource): Used for testing only, fill be removed
  in a future change.

In addition, two new (hidden) APIs have been added to add and query
WorkChains. These APIs have only been added to facilitate testing. They
will most likely change when we add non-test users.

Co-Authored-By: Yang Lu <yanglu@google.com>

Test: WorkSourceTest
Bug: 62390666
Change-Id: Iff361eb98e079c7b2146c092dc27a3618a813c94
2 files changed