channel: fix `REQ` definition for msgpack-rpc logging
msgpack-rpc: Terminate server->client calls when the channel closes
test: Small fixes and improvements to functional helpers.lua

- Move the cleanup function definition into `restart()` so restart can be
  selectively used as a hook
- Improve error handling: Before this, errors while running the event loop would
  cause busted to get stuck. Now the error is properly raised by stopping the
  event loop first.
input: Fix conversion error in `convert_input()`

The `rbuffer_consumed` was being passed a consumed count from another buffer,
causing integer overflow in `rbuffer_relocate`.

Fixes #1343
Merge PR #1354 'Fixes to channel.c, input.c and helpers.lua'
job/valgrind: Fix invalid reads/missing free.

The JobEvent structure may refer to a job after it has been freed. Apply
@tarruda's patch to extract the job data before pushing the event.

Also, fix the type, "data" -> "job", in on_job_exit() and free the job
name in the last job event.
job_start: Do not close in/out/err on error.

The streams job_close_*() reference have not been initialized by the
time we call uv_spawn() and libuv closes these pipes for us when spawn()
fails.
test/shell: Add failure tests for `system()`.
test/job: Implement some basic jobs tests.
Merge PR #1350 'valgrind/jobs: Fix invalid reads.'