CEC: Prevent premature standby process completion

Handles the situation where standby is prematurely completed
by handleTerminateArc initiated in HdmiCecLocalDeviceTv.disableDevice().
Power status is now checked to stop the flow before removing
RequestArcTerminateAction which can call mPendingActionClearedCallback.

Also Make sure mPendingActionClearedCallback is set to null at the beginning
so that disable callback is not invoked unintentionally in
HdmiCecLocalDevice.checkIfPendingActionsCleared() which is supposed to work
at standby process only. It is now invoked by handleDisableDeviceTimeout
to make sure standby process is completed with PendingActionClearedCallback
at HdmiControlService.onStandby().

Bug: 20159835, Bug: 19930352
Change-Id: Iac29dfb6acff76182ff4e9563edc611406c23f3c
2 files changed