Register seen objects under their constructor name when stringifying,
this speeds up the indexOf() calls, since they can happen on fewer
objects.

This change doubles the stringifying of an object containing 100000
sub-objects from 120 seconds to 60 seconds.

Still too slow, of course. More optimizations are possible, later.