Ticket #48406 - Avoid self deadlock by PR_Lock(conn->c_mutex)
Description: Fixing ticket 48338 introduced a self deadlock.
To avoid the self deadlock, tried to remove PR_Lock(conn->c_mutex)
which looked harmless, but it introduced a crash by memory corruption.
This patch replaces PR_Lock/Unlock with PR_EnterMonitor/ExitMonitor,
Reviewed by email@example.com, firstname.lastname@example.org, and email@example.com.
Thank you, Rich, Ludwig and William!
(cherry picked from commit f25f804a8bce83b3790e7045dfc03230d7ece1af)
(cherry picked from commit 84da7d05ddc5a963b0d025df08f38a6ccd7d90d2)