Send end of stream marker when sync session finishes
This branch ensures that the BTP end of stream marker is sent when an outgoing sync session finishes. This allows a duplex connection to be closed cleanly when both sides have finished sending data.
This fixes a bug where connections weren't closed when removing a contact.