coretext: use a different api to get utf8 strings from cfstrings

Using CFStringGetCStringPtr can return NULL if the CFString internal
representation is not UTF8.