DatabaseColumn refactor

depends on https://github.com/dimagi/commcare-hq/pull/781