Overrides _todict in CategoryType
Overrides _todict function in CategoryType to stringify the keys of the categories dict - allows interoperation with json and couchdb