lib: Add internal function to calculate strlen for strings encoded in Latin1 or UTF-16LE
lib: Mind character encoding in value_key_len, add matching node_name_len function

Since iconv() does not treat null characters as special, this makes it
possible to read node names and value keys with embedded null
characters. which are not displayed at all by Windows Regedit.
generator: use node_name_len, value_key_len API in bindings