When adapting an image, make the values of href and resource the same

When the resource attribute of the <img> tag is different from
the href attribute of the <a> tag around the image, Parsoid inserts
an unnecessary link attribute to the wiki syntax of the image.

The <img> is not immediately enclosed in the <a> tag, so .parents()
must be used instead of .parent().

Bug: 70052
Change-Id: I9eebc665c9beef38998520858c58caba98c13539
Merge "When adapting an image, make the values of href and resource the same"