Improvements to image quality handling in the image editor classes.

props markoheijnen, DH-Shredder.
fixes #25721.

Built from https://develop.svn.wordpress.org/trunk@26645


git-svn-id: http://core.svn.wordpress.org/trunk@26535 1a063a9b-81f0-0310-95a4-ce76da25c4cd