Fix unicode issues with text core

Fixes https://github.com/kivy/kivy/issues/1824 by making glyphs consistent with input type (unicode or bytes).