MDL-25500 Locking: Make postgres use a unique int key for each db/prefix combo

This will prevent key space conflicts between multiple instances running on the same db,
or even just the same db server.