When doing x86_32 port, I realized that cont helper methods are sensitive to `rsp`, which makes the usual trick of using a scratch register for `thread` dangerous. We can just lift the entire thread-acquisition business into the methods themselves. Related to that, we can also do the same thing for monitor-count helper methods, thus fully isolating them from the caller code. It would be even better after JDK-8286957.
This does the shared code change, so that x86_32 port can hopefully continue as late enhancement after RDP1.