Bug 1061120 - [Calllog][Dialer] Time duration format is not showing 'min...

...' or 's' in 'Call Information'
This whole block is really overly complicated and difficult to follow. This is untested but looks much cleaner to me:
```js
function padDuration(duration) {
  return {
    h: (duration.h <= 9 && '0') + duration.h + '';
    m: (duration.m <= 9 && '0') + duration.m + '';
    s: (duration.s <= 9 && '0') + duration.s + '';
  };
}

// ...

var h = elapsed.getUTCHours();
var m = elapsed.getUTCMinutes();
var s = elapsed.getUTCSeconds();

var durationFormat = l10nPrefix || 'callDuration';
var durationArgs = {
  h: h + '',
  m: m + '',
  s: s + '';
};

if (l10nPrefix === 'callDuration') {
  // Pad the args with a leading 0 if we're displaying them in purely digital format.
  durationArgs = padDuration(durationArgs);
}

if (l10nPrefix === 'callDurationText' && h === 0 && m === 0) {
  // Special case: only display in seconds format (i.e. "5 s") with text formatting, as
  // digital formatting doesn't support this.
  durationFormat += 'Seconds';
} else {
  durationFormat += h > 0 ? 'Hours' : 'Minutes';
}

return navigator.mozL10n.get(durationFormat, durationArgs);
```