Run clang-modernize and manually fix the result

[clang-modernize](http://clang.llvm.org/extra/clang-modernize.html) makes C++ code use some new C++11 features.

- I avoided the use-auto transform because it makes the code way too non-obvious.
- I'm not sure about the passby-value transform.
- We don't use `std::auto_ptr`.