Per-client memory usage reporting feature.
Some additional comments won't hurt.
Fixed building on GCC 4.6.
Some beatifulization.
Merge branch 'memory-usage-reports'