reg/tests: Test key formats
reg: Sanitize key paths in main

Checks against backslashes at the start and end of a key. Strips
single backslash from end for ease of parsing later on.
reg: Add path/key conversion functions

Functions to get the key, root key, and root key name string from
a string sanitized by sanitize_path
reg: Add wchar/type conversion functions
reg: Add wchar/raw data conversion functions

In the case of REG_SZ and the like, it may seem like the functions
perform an unncessary copy of the strings which should already be
in memory ripe for the taking.

However because these functions handle more than one type of data
the calling function needs to be able to free the data afterwards.

Simply returning the input string would result in a function
freeing one of it's own parameters, so we make sure to return
new memory by making a copy.
reg: Clean up reg_add
reg: Clean up reg_delete
reg: Implement query functionality
reg: Remove reg_printfW and replace with reg_print

reg_printfW has a fixed maximum message size, and as a result you
will get either segfaults with vsprintfW or half-finished strings
with vsnprintfW.

Since I'm not allowed to use _scwprintf from msvcrt to dynamically
allocate the correct amount of memory I simply print each component
separately since most things to be printed have already been turned
into strings.