CXX: switch to C++11, add -Werror to CXXFLAGS for gcc and clang
G++-4.6 only supports c++0x, not c++11
Merge pull request #506 from LebedevRI/cxx-c++11-werror

Switch to C++11 for our C++ code. Minimal gcc version is 4.6