Verify extension provided when generating ShortUrls

When generating ShortUrls, the server does not currently validate the extension provided by the client.

If the user provides an unsupported extension, the ShortUrl is generated, but upon trying to fetch it, Imbo will respond with a 500 error and throw an exception: "Unable to set image format".

This PR validates the extension provided (if any) against the list of known image formats supported in Imbo.