Refactor generic locking

* Extract db.NamedLock that is responsible for creating the lock names
  from the type
Fine-grain locking for build scheduling

* Only one scheduler per Job at a given time
* Stops using global scheduling lock table
* Lock bails immediately if taken by somebody else (and checks next job)
* Adds JobSchedulingLock named lock type

[#81247410]
Fine-grain locking for resource checking

* Only one scanner per resource at a given time
* Stops using global lock table
* Lock bails immediately if taken by somebody else
* Adds ResourceCheckingLock named lock type

[#81247410]
Add coverage for failed lock on build scheduler

[#81247410]
Fine grained lock for build tracking

[#81247410]
Merge branch 'feature-fine-grained-locking-81247410' of https://github.com/luan/atc into luan-feature-fine-grained-locking-81247410
push config down into database

no behavioral change yet, but an API is upcoming that will allow setting
the configuration dynamically.

if started with the -pipeline flag, dynamic update will be disabled, so
that the runtime config does not become out of sync with the file.

[#80072170]
split config db from db interface
refactor radar runner to use dynamic ifrit group
thread resources through scheduler to factory

rather than having the factory fetch from db, which may be different
from the original call time