Fix for issue #258: toEqual goes into infinite recursion for cyclic data

This is my suggestion for solving the cyclic data issue:

The data is decycled before comparision.

The function for decycling the data is copied from [cycle.js](https://github.com/douglascrockford/JSON-js/blob/master/cycle.js) from [douglascrockford/JSON-js] (https://github.com/douglascrockford/JSON-js).
I had to make a few changes to it, so that it meets our needs.