Test that stdio-server crashes if passed invalid JSON

Also factor child spawning out as a separate module for tests
Move emit to module and provide console methods

`lib/bootstrap/emit` now provides `emit(<event>, params...)` and
`console.log(what...)` and friends. For now, `console` methods with a level
other than `log` prepend their level to the message. So:

```javascript
var console = require(options.spooky_lib + 'lib/bootstrap/emit').console;

console.log('hey', 'yo'); // -> emit('console', 'hey yo');
console.debug('hey', 'yo'); // -> emit('console', 'debug hey yo');
```

close #45