Json path for circular references and performance

The Json output now builds and prints a path from the root to objects
that are refered to multiple times.

Caches has been introduced to reduce the work needed for reflection
thereby making the printer x3 times faster.