Copy remote job scripts to a temp file and rename it.

This avoids problems due to the job file overwriting itself when suite
and task host share a filesystem.
Retain Jinja2 during inlined edit sessions.
Merge pull request #951 from hjoliver/inlined-edit-change

Retain Jinja2 during inlined edit sessions.
Merge pull request #950 from hjoliver/job-submission-fix

Copy remote job scripts to a temp file and rename it.
Print exception in dbstatecheck.
Merge pull request #953 from arjclark/dbstatecheck.catch_err

dbstatecheck.py: print exception
Fix pre-intial handling after restart.
Trivial changes (comments, whitespace) to one example suite.
Added a new test suite.
Merge pull request #957 from hjoliver/956.fix-831

Fix pre-intial handling after restart.
Increase connection timeout and handle lock better in poll mode.
Merge pull request #959 from arjclark/db.increase_timeout

Increase connection timeout and handle lock better in poll mode.
Fixed bug in Daily cycling module.
Amended daily cycling test for new-found bug.
Grab db data for restart more efficiently.
Use python to combine queries for faster performance.
Style correction.
Better results iteration.
Merge pull request #965 from arjclark/restart.optimise

cylc-restart: reduce time to restart large suites
speed up cylc validate