Detect any illegal graph node notation.

Addresses #456 in particular: fail foo:x[T-n] (should be foo[T-n]:x).
Restore retention of collapsed in graph viewer on reload.

And do a little refactoring of the cylc_xdot module.
Merge pull request #663 from hjoliver/graph-viewer-collapse-reload

Restore retention of collapsed state in graph viewer on reload.
Merge pull request #661 from hjoliver/456.bad-graph-notation

Detect any illegal graph node notation.