Don't unnecessarily import from modules depending on pygraphviz.

Closes #525.
Merge pull request #527 from hjoliver/525.graphviz-dependence-revisited

Don't unnecessarily import from modules depending on pygraphviz.