bugfix for HIVE-2942: substr on string containing UTF-8 characters produces StringIndexOutOfBoundsException

see issue: https://github.com/dianping/cosmos-hive/issues/24