UltraHDR: reorder MPF and EXIF

For encode API-2, 3 and 4 where input has a JPEG, we always want
the EXIF package appears in front of MPF.

This change also fixed "double null terminator" string problem in
the decoder helper.

Bug: 292561235
Test: jpegr_test.cpp
Change-Id: If6890cc499e179ba01c4e7775796111edb7a5d2f
4 files changed