Refactor registry DB layer into proper stores
Created by: eseliger
Introduces a subpackage stores
and converts the existing code into our 2021 style stores, including support for mocking. The stores
package is pretty much done, now the next step (and PR) would be to tackle the uses of dbconn.Global in the various places in the registry package.
At least, 37 to 32 occurrences of dbconn.Global
.