Wait for stdin end when livesyncing with enabled watcher

This enables us to close the node process from a parent process using the stdin pipe.
Its end event will be fired when we close the pipe manually or close the parent process.