Factor the mtree set format APIs into an internal function.

Declare C and D format, where mtree outputs each entry on a (very long)
line, with path first (C) or last (D).
Add the output_dot_dot option that controls the output of the '..'
entries. Turn it off for -C and -D format output.
Implement -C and -D libarchive output, where the entry fits on
a (very long) line, with entry's path as first (-C) or last (-D)
component.

The space used to separate entry keys precedes (or follows) the
key on the line, so rework the whole write_mtree_entry() function
to cope with this:
- add "pathlast" variable to specify where on the line the path
  should appear;
- add mtree_entry_append_key(...) function that adds keys to the
  line, with the space added according to "pathlast";
- flags, uname, gname and symlink are now quoted when their value
  is first set into mtree_entry, instead of doing it during output;
- use a sum buffer to allow conversion of crc/hashes into ASCII
  strings before adding them to the buffer.
Support -C and -D option.

For now libarchive's mtree can output directly the -C and -D format,
contrary to original mtree(8) that had to draw a classic mtree spec
first then convert it.