Backport revision 4839 of PJProject.

This is in reference to issue https://trac.pjsip.org/repos/ticket/1766
from PJProject.

We would see seemingly-random assertions in the transaction layer due to
concurrency issues. The fix provided by PJSIP is to be lenient with the
checking on a transaction timeout instead of asserting.