(sort of bug 32410) Fix EXIF GPSAltitude calculation when below sea level.
In EXIF, GPSAltitude is stored as a fraction string like "1/2".
For values below sea level we were negating this value, in order
to represent the sign and the magnitude in the same value. However,
I forgot to convert that to an integer before negating it. PHP was nice
enough to do a best effort conversion of the string to an integer.
This resulted in altitudes below sea level being taken as just the
numerator of the altitude, which gives results that can be significantly
off.
Also add unit tests for the GPS related image metadata stuff. Change the
existing GPS test to use a fractional altitude (Since this issue isn't
appearent if the denominator is 1). Add tests for XMP as well, since
XMP had same issue, and has to do same processing as EXIF stuff does.
In some future time, may want to consider just converting all exif rational values
to real numbers during the extraction process for generally better sanity.
Patchset 2: rebase
Change-Id: I49032b52a4c840b28e667a6a2b8ae23c508df247