CodeParser: Check the magic number and code count here instead of in dllmain.

InitMods() still checks the magic number right now, but the stream
is rewound before codeParser.readCodes() is invoked.
InitMods(): Don't bother closing codes_str if it wasn't opened in the first place.
Remove targetver.h

targetver.h only has #include <SDKDDKVer.h>, which isn't needed by anything.
Initial batch of fixes for building with MinGW.

There's still a ton of MSVC-specific things to port over,
but these are fixes that improve the MSVC build too.

- Marked several inline functions in headers as inline.
- Marked PrintDebug()'s Format argument as const.
- Renamed some typedefs and struct names so they don't conflict
  with struct member names. (Compatibility typedefs are included
  for MSVC, since MSVC doesn't seem to care.)
- #ifdef'd out MSVC-specific property emulation.
- #ifdef'd out wstring functions, since MinGW's stream objects
  don't support wstring filenames.
- Fixed capitalization in #include "stdafx.h".
- CodeParser::processCodeList_int(): Added a default: case.
- dllmain: Separate origlist++; into a separate line to prevent ambiguity.
- InitMods(): Pass string::c_str() to snprintf().
- Cast function pointers to (void *).
- Other miscellaneous changes.