[BB-1072] consul: replace lock with a transaction
Created by: singuliere
the _write_metadata_to_consul function is the only function writing the configuration to consul and there are no other software writing the same keys. There is no need for a lock and a transaction ensuring the entire configuration is written as an atomic operation is enough.
distributed locks lead to subtle bugs that are hard to debug and diagnose