reg.exe: Check key_name in wmain

Moving the single slash, the error on remote, and the end trim to
wmain means there are ~15 less places we have to check.

Since key_name is used in all 3 operations it's a good place to put it.
reg.exe: Add path_get_key() to remove boilerplate
reg.exe: Add wchar/type conversion functions
reg.exe: Add internal error string
reg.exe: Add wchar/raw data conversion functions
reg.exe: Implement query functionality
reg.exe: Clean up reg_add

Adds defaults and checks
reg.exe: Clean up reg_delete