JNI: Rewrite locking for synchronized methods.

Lock and unlock in dedicated entrypoints instead of the
`JniMethodStart*()` and `JniMethodEnd*()` entrypoints.

Update x86 and x86-64 lock/unlock entrypoints to use the
same checks as arm and arm64.

Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing
Test: run-gtests.sh
Test: testrunner.py --target --optimizing
Bug: 172332525
Change-Id: I82b5af211aa22479f8b0eec7f3a50bc92ec87eca
32 files changed