Hook phantom.onError in the bootstrap script

If an unhandled error occurs, the bootstrap script emits an error event and
exits with a non-zero exit code. Partial progress toward #4.
Also emit trace when crashing in onError
Crash if passed an invalid transport
Use system.stdin instead of /dev/stdin

Remove buffering logic

close #42