Obtain Codec2 instances from hwservicemanager

In libcodec2_client, the list of services listed in the manifest is
now queried from hwservicemanager. The caching mechanism has to be
modified accordingly.

This CL also modifies the way component traits are cached---component
traits are assumed to be static even if some services die and restart.

Test: make cts -j123 && cts-tradefed run cts-dev -m \
CtsMediaTestCases --compatibility:module-arg \
CtsMediaTestCases:include-annotation:\
android.platform.test.annotations.RequiresDevice

Bug: 112362730
Bug: 121132171
Bug: 128320274
Change-Id: I312f3281565aa6f1ee54f86963672f56777f418f
4 files changed