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 see, in that case can you change `bg%x` to `bg%d`? Sorry to ask you to do this, just want to make everything consistent. I will add an option if necessary.

About the image reference, what I meant is that an image is defined (in `<defs>` as you mentioned), and then used for multiple times in a page. So why do you say `at most once`? But again, we can wait until someone complained about this for now.

You don't need to worry about the temporary objects, even without RVO, there are _rvalue reference_ in c++11, and I believe that `std::string` in recent C++ library should have integrated this features.