Fix resize issues (Part III, Fin)

Last round of fixes and refactorings regarding resize issues
and the Canvas component:
  * Consolidate all the width calculation logic inside the Canvas component
  * Consolidate image resizing logic in the Canvas component
  * Fix size problem with SVG images
  * Clean up comments and tests

Change-Id: I0198cc1e3a45f7287b9a7494f73a8f158303f886
Bug: 56454
Mingle: 239
Merge "Fix resize issues (Part III, Fin)"