Convert gcylc stopped state to str in case it is None.
Fix casting of datetime in scheduler.
Merge pull request #631 from arjclark/fix-shutdown-datetime

cylc shutdown|stop: fix using a datetime for shutdown
Merge pull request #626 from hjoliver/gcylc.str-stopped-state

Convert gcylc stopped state to str in case it is None.