matrix.save_numeric(): Improve header/footer formatting
matrix.save_numeric(): Improve header/footer formatting

- Prevent empty "# comments: " lines from appearing if no header / footer are defined.
- Fix formatting of multi-line entries.
- Sort keys alphabetically.

MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3,MRtrix3/mrtrix3