Expose pluggable reference database backend

Merge refdb branch into alcheByte fork