Cleanup db.TaskResource model

*) rename column `name` to `key`
*) change type of `key` column from plain text to json
*) remove convertion string to json and back from other parts

Change-Id: I960a5e06b031d024709906133b4bdb7387e07644