Android: Add GcStateAssert class to ensure destroy() is called on objects

Remove finalizer in to test it out.

android-binary-size trybot shows the abstraction adds zero overhead with r8
Also contains a -checkdiscard to ensure it doesn't regress.

Bug: 149440
Change-Id: If9cd57c140a334e31c126f5b295c583c78302e92
Commit-Queue: agrieve <>
Reviewed-by: Tommy Nyquist <>
Reviewed-by: Bo <>
Reviewed-by: Sam Maier <>
Cr-Commit-Position: refs/heads/master@{#623826}
6 files changed