New image management

Reviewed all image management.
Now all images are based on memory stream. If NO resize is done (that is
the only case where the quality is used) then the original image is
saved.
If original image is NOT a JPG the image is converted to JPG in memory
using 100% quality
If Resize is used image is recompressed.