An alternative Lock Implementation

Implement a complete alternative to the OntoLock using the same interface
Fix the problem of releasing lock

https://oat-tao.atlassian.net/browse/TP-281