Fallback options for receiving bad information into Scalable object

The Scalable object is updated with information from the API request
needed for original dimensions. Most of the code then checks whether
we have original dimensions before proceeding to use it.

However, when an API response returns invalid dimensions, the
dimensions object might be set to { width: undefined } which is then
processed as having dimensions object. Strictly speaking, however,
this is not a valid dimensions object and shouldn't be considered
as such.

This wrecked havoc on the calculations done with the aspect ratio,
and specifically the MediaSizeWidget's 'full size' and 'default'
buttons.

Changes made:
* Added a 'isDimensionsObjectValid' method to ve.dm.Scalable that
  tests dimension objects specifically to see if they are valid
  before update is done to any of the stored dimension values.
* Added originalSizeChange event to ve.dm.Scalable and a listener
  in ve.ui.MediaSizeWidget to make sure that the 'full size'
  and the 'default' buttons are only enabled when original
  dimensions are acquired, even if the API response is slow or was
  completed after the widget is already loaded.
* Fixed small typos in setDefaultDimensions in ve.dm.Scalable

Change-Id: I1242e8dadca4f2cf2737c366034a77edc5ce308e
Merge "Fallback options for receiving bad information into Scalable object"