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.