ot::Coap::Message::Finish() method
Writes header to the message. This must be called before sending the message. Also checks whether the payload marker is set (`SetPayloadMarker()`) but the message contains no payload, and if so it removes the payload marker from the message.