transcoding: fixes for binder died handling

Change client id type to uintptr_t counter, instead of
casting binder to int64_t.

Save all shared_ptrs of clients in global registry.

bug: 154734285
bug: 145233472

test: transcoding unit tests; manually plant crash
in test client and check binderDied handling in log.
Change-Id: If6523a1c6b7ce797a2201462399174e9cf0a3c71

Change-Id: I6b312c0f28a345285e27b738c37baee2bccae755
diff --git a/services/mediatranscoding/SimulatedTranscoder.h b/services/mediatranscoding/SimulatedTranscoder.h
index 41a06f5..6e6da64 100644
--- a/services/mediatranscoding/SimulatedTranscoder.h
+++ b/services/mediatranscoding/SimulatedTranscoder.h
@@ -38,8 +38,8 @@
 public:
     struct Event {
         enum Type { NoEvent, Start, Pause, Resume, Finished, Failed } type;
-        int64_t clientId;
-        int32_t jobId;
+        ClientIdType clientId;
+        JobIdType jobId;
     };
 
     static constexpr int64_t kJobDurationUs = 1000000;
@@ -48,9 +48,9 @@
 
     // TranscoderInterface
     void setCallback(const std::shared_ptr<TranscoderCallbackInterface>& cb) override;
-    void start(int64_t clientId, int32_t jobId) override;
-    void pause(int64_t clientId, int32_t jobId) override;
-    void resume(int64_t clientId, int32_t jobId) override;
+    void start(ClientIdType clientId, JobIdType jobId) override;
+    void pause(ClientIdType clientId, JobIdType jobId) override;
+    void resume(ClientIdType clientId, JobIdType jobId) override;
     // ~TranscoderInterface
 
 private:
@@ -60,7 +60,7 @@
     std::list<Event> mQueue GUARDED_BY(mLock);
 
     static const char* toString(Event::Type type);
-    void queueEvent(Event::Type type, int64_t clientId, int32_t jobId);
+    void queueEvent(Event::Type type, ClientIdType clientId, JobIdType jobId);
     void threadLoop();
 };