This version uses just one put request for each received document,
but expects to get notification of lock which is now first element
of active array in format of hostname:pid
It makes it play nicely with new Mojo::UserAgent which doesn't
want to issue multiple put requests even if I create new Mojo::UserAgent
for each of them.