Fixed _WIN32_WINNT definition

The _WIN32_WINNT definition is now set to 0x0501. This
variable is set to the earliest supported windows version.
This is Windows XP.
Added cleanup of the msg window

Send a WM_CLOSE message to the message-only window and
unregister the msgWindowHandle from WTS.
Renames HINSTANCE and window class name
Move global vars to the top
Renames setter for lastKeycode
Moved setter of lastKeycode close to getter
Moved Dll entry to top and added func prototypes

The Dll entry point is moved to the top for better structure.
Added prototypes for functions which didn't have one and
moved all the prototypes to the top.
Renamed the create window function