Use range-based for loop

Looks so much nicer!
Include <cstdint> instead of <stdint.h>

Now that the code requires C++11 we might as well prefer the C++ version
of this header.