Write nodes sorted by id ascending. Do not duplicate nodes.
Some external tools (osmconvert in particular) rely on nodes to be sorted by id.