Call file.size only once and only if necessary

Discovered while profiling (using Chrome) that the file.size property is expensive. This code change optimizes performance by only accessing the 'size' property once and only if needed.
Merge pull request #2722 from dougdomeny/patch-1

Call file.size only once and only if necessary
Refactored last merge, updated version number.
File size validation performance improvements. Thanks @dougdomeny
Added imageQuality option, which is passed to the canvas.toBlob method to save resized images.

Removed mozGetAsFile code from the image processing plugin, as Firefox
supports setting the FormData filename since version 22 (current
version being 25).
Added imageForceResize option, to force writing to and saving images from canvas.

This will also process images via canvas that fit the maximum
constraints.
Added imageType option to force the type for the image saved from canvas.
Added imageQuality, imageType and imageForceResize options.