Always use debugging options in CMake build
Fix compile error looking for MAXPATHLEN
Initial survey work
Fix incorrect refcount printing
Update refcount survey to track data in-memory.

This is significantly faster and somewhat easier than dumping the
trace (in fact, the slowdown isn't terribly noticeable anymore).

However, the results will now be significantly less accurate,
since we keep track of every increment for an object, rather
than just the highest value it achieves. Doing so would be
much more difficult since we'd need to track the size of every
live object.
More thorough tracking of refcount changes
Split refcount survey out into separate source files.
Track all reference count operations consistently
Multi-threaded surveying

Dumps out results at the end of each request
Print global results rather than thread-local results after each request
Split survey header into two files to make compilation quicker

Renames dump_refcount_survey() because we're going to expanding that
method very soon
Add basic release time tracking

Currently incurs performance penalty.
Need to try and do something about that
Track and print a table of allocations vs deallocations

Requires TRACE=tmp1:2
There's currently a discrepancy between allocation (which tracks
everything) and deallocation (which only tracks refcounted objects)

Not sure whether this can be fixed by carefully instrumenting memory
manager methods
Add tracking of object size
Commentary
Print memory usage statistics after each request
Refactor statistic-collection into a Histogram class

Changes TRACE to 'rcsurvey'
Add tracking of object lifetime

Pretty up the report display
Minor formatting changes
Fix refcount survey against master, and fix indenting in those files