copy on write deep, cyclic js objects