Fix building with Clang 3.0 without extra CXXFLAGS

Clang identifies as GCC 4.2 to compilers which check for GCC version. This patch adds further check for clang and undefines __DEPRECATED macro in case Clang is detected. Newer versions of Clang are much stricter and still require CXXFLAGS for other warnings.
Upgrade waf to 1.7.11.
Clean up core module for building with Clang

This means removing unused private variables in random-variable-stream.{cc,h} and system-thread.h and fixing removing bad static_casts in calendar-scheduler.cc.