update DiagramURL to contain arbitrary key/value pairs

This is for specifying things like width/height.
fix Haddock formatting
implement compileDiagram, compiling a single linked diagram