add crate support to db module

this pr adds support for [crate](https://crate.io) in the db module.

Main reason was to use it together with a module that persists messages to the db (see https://github.com/mfussenegger/willie/commit/9add80281790be7b2e63fcf21a1f90489fab410f - but that needs a little more work and should probably be more generic to work with other db backends too)