fix(engine): Remove job state when clearing dead machine state
fix(registry): return error from SetMachineState