add VignetteRequest::setThumbnailFormat to forcefully modify an image's format potentially after the url has been generated
move !empty check
always make sure the new extension is allowed
use ltrim()
make code more readable /cc @drsnyder
Merge pull request #5743 from Wikia/PLATFORM-647

allow a Vignette url to change formats after the url has been generated