initial support for C++11 / C++0x, light ver of PR #321

these are hand-made changes to support c++0x and c++11, starting at gcc>=4.6, maybe even older. 
it's important so we can start using those features in code. 
used clang-modernize to do basic translation to c++0x, changes include: range-based for-loops, auto data type, nullptr.