Implement proper dependency analysis for code blocks

Only collect the code blocks which are actually needed, transitively,
to compile each diagram.  This means that we do a lot better at only
recompiling diagrams which really need to be recompiled.  The downside
is that one must put many more import statements.

Fixes #9.
Merge my work on #9 into HEAD

Conflicts:
	diagrams-haddock.cabal
	src/Diagrams/Haddock.hs
Add simple logging (and -q option to suppress it).  Fixes #10.
flush output so name of diagram being compiled is displayed right away