msgcat: support sorting

Add the following options:

  * --sort-by-msgid
  * --sort-by-file
  * --sort-output: Just for GNU gettext's msgcat compatibility