UTF-8 codes up to 4 bytes

* Refactor for arbitrary number of bytes
Merge pull request #8 from pixelglow/utf8-codes-up-to-4-bytes

UTF-8 codes up to 4 bytes