Updating nexpect to emit events.

This allows nexpect to work with conditional branching. It will emit 'wait' right now, and the data will be the line of output which matches the expected output. From there, you can re-test the data and call sendline, expect, or wait again. Note that the user MUST call wait BEFORE the end of the stackframe on which the child was spawned.

This is a rough first draft, but it does not introduce any breaking changes as far as I can tell. All tests still pass, and the new test I have written demonstrates the new functionality. I have also added an example to the readme file.

I think this feature is critical to getting nexpect to actually act like tcl's expect. Otherwise, there is no way that I see to send different input based on the output.
This child.run(...) should probably be after the child.on(...) and child.wait(...), but it will work properly in either case as long as they are in the same stack frame.