Add locking context manager
Enhance Database
with a lock (context manager) method that blocks if the passed id was already locked by another client.
I also updated a bit the dependencies and added an auto-reconnect feature that addresses lb-nightly-scheduler#1 (closed) and lb-nightly-functions!20 (comment 4257691)