Cleanup reference implementation
Remove old hash table
Fix misc bugs
Fix infinite loop when case folding invalid UTF8 chars
Improve invalid UTF8 codepoint skipping
Do not use strchr for span searches

Strchr will return a valid pointer for '\0' when searching a static
string, as the NULL byte is part of the string.
Do not create references with empty names
Handle overflows in the codepoint parser
Cleanup external APIs