Automatically discover "Image Format" based on file extension

This commit can automatically pre-populate the "Format" field in
the "Create Image" modal after the user has filled out the "Image
Source" or "Image File" fields. This can be done based on the file
extension and save the user from filling out one additional field
in this modal.

Change-Id: Id6e3f3b3f8e354ce077a8f05f2bd5029b7fa9628
Closes-Bug: #1324192
Merge "Automatically discover "Image Format" based on file extension"