Assuming that buf is a pointer to the first byte of a
UTF-8 encoded string, this takes the first character of char *
buf and works out how many bytes the encoded character will
take up. Uses a table called PL_utf8skip also defined
in utf8.h.
This C macro turns on the flag in the SV (scalar value)
which says that the string is Unicode. It does not check whether the
scalar value contains UTF-8 or not, so before using this it is
necessary to use is_utf8_string to check whether the
bytes actually are UTF-8 encoded or not.