Provide more useful messages for job failures
Provide more useful messages for job failures

Failing pipelines with an error within a job were quite difficult to
debug as they require digging into the jobStore to identify error
messages. This path improves the output to report the underlying failure
at the top level to more easily identify the problem.

Ensures a safe fallback when failing to prepare the detailed log message.

Original failures look like:
```
Exception in thread Thread-1:
Traceback (most recent call last):
[...]
    raise RuntimeError("The termination flag is set, exiting")
RuntimeError: The termination flag is set, exiting

Traceback (most recent call last):
[...]
  File "/home/chapmanb/bio/toil/venv/local/lib/python2.7/site-packages/toil-3.3.0a1-py2.7.egg/toil/leader.py", line 69
7, in mainLoop
    raise FailedJobsException(config.jobStore, len(toilState.totalFailedJobs), toilState.totalFailedJobs)
toil.leader.FailedJobsException: The job store '/tmp/user/1001/tmplfzfpv' contains 1 failed jobs
```
which do not indicate the actual error and require looking in the job
store directory (at least for file system job stores), looking through
all jobs in the store, then looking through all files in the storage to
find the error.

After the fix we now extract the underlying error, reporting it along
with the failed job ID:
```
toil.leader.FailedJobsException: The job store '/tmp/user/1001/tmp5o3I44' contains 5 failed jobs: k/o/jobiDqKj4, 4/z/jobOYTUGp, Y/G/job2MEtR3, J/t/jobGM576Q, 0/I/jobgSvX9x
=========> Failed job k/o/jobiDqKj4
---TOIL WORKER OUTPUT LOG---
Traceback (most recent call last):
  File "/home/chapmanb/bio/toil/venv/local/lib/python2.7/site-packages/toil-3.3.0a1-py2.7.egg/toil/worker.py", line 332, in main
    job._runner(jobWrapper=jobWrapper, jobStore=jobStore, fileStore=fileStore)
  File "/home/chapmanb/bio/toil/venv/local/lib/python2.7/site-packages/toil-3.3.0a1-py2.7.egg/toil/job.py", line 2323, in _runner
    returnValues = self._run(jobWrapper, fileStore)
  File "/home/chapmanb/bio/toil/venv/local/lib/python2.7/site-packages/toil-3.3.0a1-py2.7.egg/toil/job.py", line 2271, in _run
    return self.run(fileStore)
  File "/home/chapmanb/bio/toil/venv/local/lib/python2.7/site-packages/toil-3.3.0a1-py2.7.egg/toil/cwl/cwltoil.py", line 235, in run
    **self.executor_options)
  File "/home/chapmanb/bio/toil/venv/local/lib/python2.7/site-packages/cwltool/main.py", line 203, in single_job_executor
    for r in jobiter:
  File "/home/chapmanb/bio/toil/venv/local/lib/python2.7/site-packages/cwltool/draft2tool.py", line 218, in job
    builder = self._init_job(joborder, **kwargs)
  File "/home/chapmanb/bio/toil/venv/local/lib/python2.7/site-packages/cwltool/process.py", line 407, in _init_job
    raise WorkflowException("Error validating input record, " + str(e))
WorkflowException: Error validating input record, could not validate field `echo_in` because
  the value `{'instr': 'one'}` is not string
could not validate field `first` because
  the value `[{'instr': 'one'}, {'instr': 'two'}, {'instr': 'three'}, {'instr': 'four'}]` is not string
Exiting the worker because of a failed jobWrapper on host kunkel
ERROR:toil.worker:Exiting the worker because of a failed jobWrapper on host kunkel
<=========
```

BD2KGenomics/slugflow,BD2KGenomics/slugflow