In addition to the tenant read lock, schedulers need to also acquire an
exclusive pipeline lock. In case a pipeline is already locked by another
scheduler, it is skipped and processing will continue with the next
pipeline in the tenant.
Tenant management and trigger queues are protected by a queue specific
lock and need to acquire other locks depending on the processed event
(e.g. tenant write lock for tenant reconfigurations).
This also fixes an issue with the locked context manager when an
exception is thrown inside the context. In this case the lock was not
unlocked.
Change-Id: I2e3f0feca7119908d1d13010d2e4de791f95137e