Database user refactor/tests

This replaces the previous PR and bundles a bunch of changes up into one.  This is a stop-gap measure designed to  retain the existing provider characteristics while we consider how to refactor this into being better.

(I'm actually going to go look at the state of community forks first and see what's out there)