A pruning version of JSON.stringify, allowing for example to stringify window or any big or recursive object