Bug 1028522 - Prevent ImageEncoder::ExtractDataInternal from acting on an empty surface. r=gw280