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)
Status Job ID Name Coverage
  Test
passed #5033
amd64
job_clang_amd64

00:59:30

passed #5032
amd64
job_clang_cxx_amd64

00:31:09

passed #5030
amd64
job_gcc_amd64

00:54:04

failed #5031
amd64
job_clang_amd64

01:05:00