spindle/db: prevent status events from overwriting terminal states
Fixes a race condition where a cancelled pipeline's status could be overwritten by a late-arriving failed status event from a container that was still winding down.
Signed-off-by: moshyfawn <email@moshyfawn.dev>