Handle cyclic dependencies (instead of stack overflow)

If the object being stringified has a cycle:

- `{cycles: false}` (default) will throw an exception, just like `JSON.stringify`

```
TypeError: Converting circular structure to JSON
```

- `{cycles: true}` will print it as `__cycle__`. For example:

```js
'{"a":1,"two":{"a":2,"one":"__cycle__"}}')
```


*Note: will probably have merge conflicts with the `{spaces: '\t'}` pull request. Happy to fix/rebase the second one afterwards.*