spawn_sync: implement bindings


Test script that I smoke test with: https://gist.github.com/piscisaureus/6371772

@bnoordhuis, @isaacs: please try it out and review the code. I consider the `spawn_sync.cc` file done for now, until someone reviews it or me/someone else runs into a bug.