look for files in cache-dir as well as static-dir

I do a lot of editing Dot blocks in the browser preview page, which was causing a buildup of images in the static/img dir. This changes plugins to put images in cache-dir instead, and changes gitit to look there first. It assumes that dot diagrams should be drawn on-the-fly, but could be modified to save the image in the static-dir when an explicit name is given, if that's an important use case. I have another pull request that builds on this to make clickable SVG dot diagrams.