Added new logging macros

Visual Studio figured out variadic macros around 2005, so we can
finally replace the explicit-arg-count debug log macros.

Also, fixed some include guards.

Also, bumped version to 4.0.0d1.