beef up lock system

I have removed the dependency on `anlock`. Furthermore, I have separated the `Lock` class into three different layers: `Lock`, `OrderedLock`, and `YieldingLock`.

Furthermore, I have created a `ScopedLock` class.