Made gnsync work on narrow Python builds

"Narrow" builds of python only support 3-byte Unicode characters, but
gnsync required four-byte support. This change discovers whether 3- or
4-byte Unicode is supported and does the right thing accordingly.