[CPMS] When subscribed component sends finish immediately
it may not routed properly to CPMS.

* CarPowerManager change is to ensure that we register listener first
then subscribe to CPMS updates. Since if we do it other way, CPMS
may send an update, that may never reach target listening component.
* CarPowerManagementService change is to fix the bug, which happens
when listener component is completing pre-shutdown processing before
it generates final list of tokens. As a result, CPMS may get stuck in
pre-shutdown state forever since it thinks that component is still
working while component already sent the finish() call.

Test: Manual
Bug: 123477859

Change-Id: Ia5982562deb144193b6ada1028ef8691134d5115
(cherry picked from commit 960b7b4a635cdd08914e96909f11189430628b9c)
2 files changed