Track DeathNotifier cookie lifetime

Keep a set of cookies to signal when the DeathNotifier cookie is valid.

Test: cd frameworks/av/media/libmediaplayerservice && atest -p
Test: atest CtsCameraTestCases:android.hardware.camera2.cts.RecordingTest
Test: adb shell kill -9 `pid media.swcodec` # during RecordingTest
Bug: 319210610
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:55128e7467c39633d6b69a62b9e47096fadc5d3d)
Merged-In: Id113b8af0708c3f93e6ddef90751692ac0f32855
Change-Id: Id113b8af0708c3f93e6ddef90751692ac0f32855
2 files changed