[cli/engine] raise StopIteration(code) instead of yielding output.stop(code)

I should have done this to begin with....