Improve objc_sync.m.

* Use inline functions to improve code readability.
* Fix a wrong lock.
* Initialize it in +[initialize] of OFObject.