Use WeakReference in Pools

Android uses static Pools to store a lot of different objects in order
to avoid having to recreate new ones constantly. This changes Pools to
store WeakReferences instead of objects directly, so that layoutlib does
not leak the memory.

Flag: NONE host-only change
Bug: 401823931
Test: layoutlib tests
Change-Id: I24b17bc7fb8a45fe095190ef1fa201e54608dfe8
3 files changed