Allow clients to extend the TTS UtteranceId class.

This change allows TTS clients to create (and use) classes derived from the
UtteranceId class. This allows to attach a custom data and methods that
can be reached later in callbacks that take the UtteranceId instance as
parameter.

Also, since we can't depend on the identityHashCode results being unique,
this change adds AtomicInteger to generate unique identifiers for UtteranceId
instances.

Bug: 8259486
Change-Id: Id1e9eabc890ec585a7f8570fd20e287dcda9a11d
2 files changed