svg external bitmap

This patch enables saving bitmaps in svg as external files, so as to reduce output size and rendering costs, and allow easier post-processing of bitmaps.

Currently only DCT images can be saved as jpg, other images are still embedded in svg.

I'm not so sure about the generation number, but suppose you're right, how about this:
```
img = (1,1) // id, gen
draw img
img = (1,2) 
draw img
```
etc. 

I mean an old image has been rendered before a newer one kicks it out. 

Still there's a problem.