Data base tabled backed case id generator. The underlying table keeps single entry per case prefix and updates it
(by incrementing current value) on each call to generate method.
Generation is done with pessimistic locking to secure correctness and since it's the only operation in transaction it should not
cause any performance issues.