Push down cs_main locking in ProcessMessage

Backported from bitcoin commit 7d38af3c493f9ea24c722ec2e6d3c51f4e851364
Highlight mis-matching locks

Backported from bitcoin commit b0243da77c6ee8d8ca59b4423f333a179bff02cf