Don't stop threads immediately on clean shutdown request.

Stop them when the shutdown is actually actioned.
New command submission thread stop flag.

Now: all threads exit when a suite shutdown is actioned, but
the job submission thread stops submitting jobs before this - as soon a
clean suite stop is requested. The poll-and-kill and event handler
threads on the other hand keep working as normal until suite shutdown.
Stop command help update.
Only stop the job submission thread early.
Updated stop command help.
Distinguish between immediate and quick stop.
Don't exit main loop until command threads are done.
Wider shutdown rationalization.
Better job thread exit.

Raise an exception to escape from the depths.
Fix shell syntax in output tests.
Simplified stop task detection a bit.
Updated shutdown task test reference log.

Change understood - stop commands don't hold tasks now, instead they
stop in the submitting state and log who triggered them.
Merge branch 'master' into 737.thread-stop-adjustment

Conflicts:
	tests/output/00-submission.t
Change short stop command option -q to -Q
Merge branch 'master' into 737.thread-stop-adjustment
Applied Andy's diff to fix the restart tests.
Updated GUI for new stop option.
Merge branch 'master' into 737.thread-stop-adjustment

Conflicts:
	bin/cylc-stop
Merge pull request #739 from hjoliver/737.thread-stop-adjustment

cylc stop improvements

New interface to do:
* clean stop
* clean stop with --kill
* stop --quick (do not wait for active tasks to finish but DO finish queued event handlers)
* stop --now (do not wait for active tasks to finish and do not finish queued event handlers)