Make backend_pgf more flexible when saving to file-handles or streams (fix #1625).

Since binary data and thus raster images cannot be embedded in pgf code, saving to a stream was prohibited in backend_pgf. This PR allows saving pgf code to streams after deactivating draw_image() and emitting a user warning.

I'll merge this in a few days if there are no objections (fixing issue #1625).