Use proper C++11 feature detection.

Copy cmake module CheckCXX11Features by Rolf Eike Beer.
Original repo: git://anongit.kde.org/scratch/dakon/cmake-cxx11
Disable override keyword if not supported.
Fix cmake policy warnings for CMP0017.