Sort iptc data by record number when encoding
Copied from a forum post by Matthias Baas:
I noticed that libexiv2 writes iptc data sets in the same order as they were added to the IptcData object by the application. However, the iptc spec states that records must be in numerical order (Envelope must be before Application2). Personally, I think it would make sense to enforce this requirement in the library instead of relying on the application code to get this right (as it's just one potential bug less in all the applications using libexiv2).