Separate creating a context from running a test

This lets me write a test for being unable to connect, which won't
pass until the underlying node-amqp reports connection errors. Cough.
Use util.inherits to avoid sharing prototype field values

Constructing an EventEmitter or Stream for a prototype means that
fields can be shared among instances. This worked by coincidence until
recently, because the EventEmitter event map was initialised lazily,
whereas it's now assigned in the constructor.