feat(MockSTDIN): emit `end` event synchronously

Big deal for writing synchronous tests!

Closes #1
Closes #4