Keep track of DeathMonitor cookies

This change keeps track of the objects that the cookies points to so the
serviceDied callback knows when it can use the cookie.

Test: atest neuralnetworks_utils_hal_aidl_test
Tets: atest NeuralNetworksTest_static
Bug: 319210610
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:def7a3cf59fa17ba7faa9af14a24f4161bc276bd)
Merged-In: I418cbc6baa19aa702d9fd2e7d8096fe1a02b7794
Change-Id: I418cbc6baa19aa702d9fd2e7d8096fe1a02b7794
3 files changed