Tools: DFG: Add sorted ports, names and types.
Add core attribute.

If the merged device has only one name and/or type,
it will not be written into the tags.
=> Makes the XML a little easier on the eyes.