Handle rating and numeric columns for Kobo shelves

Kobo driver: Fix errors when using rating or numerical custom columns to
create shelves. Fixes #1253637 [Kobo driver has error when rating column used for shelves](https://bugs.launchpad.net/calibre/+bug/1253637)

Convert the category to string in case a numeric column is used. For a
rating column, divide the value by two.
Use unicode instead of str when typecasting
pep8