Properly handle partial sendings of prefixed data.

This should fix some spurious disconnections. Embarrassingly, I had advertised
before that the disconnects might be fixed, while, in fact, without this
change, it should disconnect just as often as before.

May fix Dfterm3 GitHub issue #4 but needs testing.