database: Drop legacy database access code.

Long time coming :) With the increased maturity of Gravity, this is
mostly obsolete now. There's still a few things Gravity can't do yet,
but overall it's already the way superior solution. So long.. :)