rtsp-stream: properly protect TCP backlog access
Fixes #97 (closed)
We cannot hold stream->lock while pushing data, but need to consistently check the state of the backlog both from the send_tcp_message function and the on_message_sent function, which may or may not be called from the same thread.
This commit introduces internal API to allow for potentially recursive locking of transport streams, addressing a race condition where the RTSP stream could push items out of order when popping them from the backlog.