Add StatisticsCollectingHandler and RootHandler.

Two more examples of how to write RecordHandlers.
StatisticsCollectingHandler keeps track of the number of instances of
each class and total number of bytes.  RootHandler just records all the
roots seen.