Add a refdb sqlite backend

This is just an experiment for now.