Add stdin for spawned processes

This change adds simple write functionality for a `spawn`ed process.

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