feat(database): add avalues json column instead of values/attrids (closes #4507)