Refactor Category into ActiveRecord, including renaming find_or_create
everywhere it is used.