Add stdin for spawned processes

This change adds simple write functionality to stdin of a `spawn`ed
process.

[Issue #11446](https://github.com/ariya/phantomjs/issues/11446)