SIP: refactor SIPCall and related classes and routines
The goal of the refactor is to improve stability (prevent crashes and deadlocks), clarify interactions between SIPCall class with other classes/routines. Three main changes will be introduced in this activity:
1- Add an interface to report PJSIP events
The use of this interface is to give limited access to SIPCall from SipVoipLink class and related routines. All processing involving SIPCall properties (such as SDP and RTP sessions) should be done as much as possible within SIPCall class to enhance encapsulation.
2- Use the same thread (SIP thread) for SipVoIPLink events hander and SIP Transport
All events (hopefully) reported by PSIP lib will be reported on the same thread, which will help reduce data race on SIPCall class in particular.
3- Run most of the task involving SIPCall on the same thread Dispatch tasks (when possible) on the SIP thread. Note that some calls still need to access SIPCall synchronously (getters in particular).