Handle conflicting image format options in predictable way.

The PHP parser now uses the first image format option that appears,
and ignores subsequent format options.  This enforces the "zero or one"
language in
https://en.wikipedia.org/wiki/Wikipedia:Extended_image_syntax#Type
and makes parser behavior more predictable.  This also matches Parsoid
behavior.

Change-Id: Ifa32238b3d274123c7b98022cf688c33edfd7197
Merge "Handle conflicting image format options in predictable way."