Enable C++11

Enable C++11 and use some auto.
Tested on KDAB CI. (C++11 features must be used with care, until all CI machines have recent compilers)