Add common clock lib for sharing code between infra and plugins

This intends to remove as many instances of resource lookups by name
as possible in the custom clocks and related code. These have been a
source of bugs, and by creating a common lib, we can directly share
resources to every context where they are needed.

This also refactors the way we handle non-primary view contexts. We
apply this to preview contexts in this change, but we'll reuse the same
approach for copies of clocks rendering on secondary display contexts.

Bug: 397680831
Bug: 364680879
Test: Checked rebuilt plugins
Flag: NONE Build & API change
Change-Id: I0dec6d4ca5b4d2890dd5df9c3d8440968d8afe32
72 files changed