Implements the clustering stack.
Basic clustering works now.

report_cluster needs to be rewritten more clearly.  It modifies
the information it reports, which it is not very nice.