Remove duplicated code block - error in stable->central merge at some point I guess?
Rework some error handling in local runner.
This way if something goes wrong in failing job - the original exception is reported.
Simplify command for grabbing tool in get_work_dir_outputs.

Subtlely reduces code duplication and makes runners slightly easier to unit test (fewer dependencies).
Unit tests for local job runner.

Test running, capturing standard output and exit code, killing job, setting metadata, adding Galaxy to jobs PYTHONPATH, GALAXY_SLOTS logic (default and overidding).
Refactor small __poll helper method out of local job runner's queue.
Local job runner - only poll if limits set (so can be set).

Small optimization aimed at speeding up tests - unit and functional.
Allow embedding setting of metadata as part of local jobs.

(Like it works for all other runners except the LWR). This is essentially scaffolding toward elimination of extra metadata step in local runner.

Got Dan's blessing to kill this off a while ago but I still don't quite understand why it is separated out - so doing this in two parts. This changeset changes nothing by default but adds an option to local runner destinations (embed_metadata_in_job) to allow them operate in the new fashion (embed the metadata setting step in the job itself). At some later point this option should just be removed and all local jobs should operate this way. Use this new option to speed up the local job runner or to test out how this runner will work in the future.
Rework local job runner to create job script.
Backport CLI-manager infrastructure from LWR.

I had previously reworked this CLI stuff to work with LWR - this changeset brings those changes back to Galaxy. This version has the advantage of using the job script module - the upshot is that GALAXY_SLOTS, job_conf env directives, and job metrics should all be usable now with the CLI runner. This version also has a local shell variant (to eliminate the use of SSH and run qsub directly on the same machine), a variant of the Torque executor to target slurm's torque compatibility executables (doesn't support -x), and some other small bug fixes.