Preparation for tests: made logging use win32 APIs and converted most strings in the program to Utf8. Now Logging has explicit initialization and shutdown.