Remove an unnecessary bad statement
Merge pull request #1178 from matthewrmshin/remove-bad-statement

Remove an unnecessary bad statement
Improve job submission

Job file now contains all the information for submitting a job.

Job file now sources `$HOME/.cylc/job-init-env`,
`$CYLC_DIR/conf/job-init-env.sh` or
`$CYLC_DIR/conf/job-init-env-default.sh` on initialisation. This allows
the job environment to be globally configured for site or user.

cylc job-submit: new command for job submission. Write job submission
method and job submission method ID to job status file. Use Python to
control submission of a background job. Job submission method classes
now have methods to submit a job file instead generating a job
submission command.

Job status file now contains all the information for job poll and kill
to work.

cylc job-kill: now take only the path to the status file as an argument.

cylc job-poll: renamed from `cylc get-job-status`. Now take only the
path to the status file as an argument.

New global configuration `remote copy template`: configure the `scp`
command for copying files to remote hosts.

Global configurations `remote shell template` and `use login shell` are
now used for job submission.

New global configuration `cylc executable`: configure the command to
invoke the `cylc` command on remote hosts.

New global configuration `suite to job environment`: configure a list of
environment variables that can and/or needs to be passed from a suite to
its jobs.

cylc.job_submission.jobfile: re-ordered methods to follow the flow of
the job script.

cylc.remote: use new global configuration.

PEP8 checked for various modified Python source files.
More comments on background job submit
cylc submit: fix job ID reporting logic
Basic tests for `cylc submit`

Test normal submit via `background` and `at` on localhost, a remote host
with shared file system and a normal remote host.
Basic `cylc submit` test for loadleveler
Fix `cylc submit` remote tests
Fix `cylc submit` tests tidy logic
Improve names
Support global initial scripting

Also renamed `extra job environment` to
`copyable environment variables`.
Use constants for useful job file lines

Fix comments and typos as well.
Remove unnecessary print statement
Fix names and unused variables
Further refactor to the job submission logic

Decouple the task, job submit and job file modules.

Turn `JobFile` into a singleton. Move `cylc.job_submission.jobfile` module up a
level to become `cylc.job_file`. Use a single dict to pass information to the
`write` method for a much cleaner interface.

Rename `cylc.job_submission` package `cylc.batch_sys_handlers`. (It is no
longer just about job submission, but also other interaction with the batch
systems.)

Batch system handler classes are no longer sub-classes of `JobSubmit`. This
allows their interfaces to be much more flexible.

Rename `JobSubmit` to `BatchSysManager` and turn into a singleton. Manage
instances of batch system handlers (so there is no need to create new
instances unnecessarily). Move most batch systems related logic into this
class. Move `cylc.job_submission.job_submit` module up a level to become
`cylc.batch_sys_manager`.

Allow batch system handler classes to directly format the directives. This
allows each class to have full control of what goes into the job file.

Improve `at` submission command. Use STDIN to write command to `at now`.

Improve `pbs` handler logic. If a directive key contains a space character,
then use the equal sign as the assignment operator. If a directive key does not
contain a space character, use the space character as the assignment character.
Remove the poll output filter logic, as `qstat` already returns non-zero if the
job ID is supplied as an argument and it is no longer in the queue.

10/10 pylint scores for the job file and the job system handler modules!
Improve style
Improve cylc.version logic
cylc.task_types.task: remove unnecessary logic