Add DB Mixin classes and use them
A bunch of functions on the db objects are really more like
"utility functions": They could live outside the classes
and be called "by hand" passing the appropiate reference.
They usually only use the public API of the object and
rarely use database related stuff.
Goals:
- First, simple: Share the code with the SQL objects, so
that the code doesn't need to be duplicated.
- Second, it might unclutter the db models and make them
more into "model only" stuff.
- Doesn't really hurt.