Better shutdown handling - this closes #24.

The way cylc determines when a suite should shut down is now clearly
laid out in one place. Normal shutdown is no longer determined by
whether or not "all tasks are finished or held" - now the status of each
tasks is checked with respect to the relevant shutdown criterion.
The motivation to finally get this done was that the old cruft-ridden
shutdown code caused a problem with the new restart implementation (no
automatic release of held tasks etc.): if a suite was shut down with no
runahead-limited tasks, just succeeded and held ones, it could not be
restarted as all resurrected tasks were "finished or held" resulting
in an immediate shutdown.