Small refactoring of graphviz_draw.

The only observable effect should be that calling with output=None and (output_format="xlib" or fork=True) no longer causes an AttributeError.
4 jobs for patch-3 in 113 minutes and 35 seconds (queued for 3 seconds)