Handle it gracefully if not all data can be sent at once.

This MAY fix the dreaded Dfterm3<->Dfhack disconnection bug but it is difficult
to know because I don't know how to trigger that disconnection.
Write a .dfterm3-port file when starting the Dfterm3 service.

This port file can be used to help Dfterm3 find Dwarf Fortress much quicker.