RequireJS Publisher: implement per-element lock strategy

The lock is add to the hash map of the item locks when it is locked
for the first time. If its usage is ended before next acquisition
it returns to the list of spare locks. If it has waiting thread on it
is reused from map.