mod/system_coordinator: Fix handling of final phase transition
Ensure phase processing only occurs when the next phase index is valid.
Previously, a timer could be started or a phase event sent even if the
current phase was the last one, depending on the phase_us
value.
This patch adds a check to prevent processing beyond the last valid
phase, ensuring safe termination of the phase sequence.
Signed-off-by: Mohamed Omar Asaker mohamed.omarasaker@arm.com