Combine coord and name sorted mkdup

Combine the coordinate sorted and name sorted mark duplicates commands.
When the mkdup command is called it will autodetect the sort order from
the @HD.