C++11

Reference #1401.

Change much stuff to use new library.
Fix the alignment in this file (multiple occurrences).
Perhaps the best fix would be to move the comments in front of each declaration.