Create inverse function to recover* functions.
Bug: T344955
This will allow us to supply the exchange format in evaluator tests, rather than using full Z7s.
This MR also addresses some subtle issues related to in-place manipulation of JS Objects. We now copy more rigorously throughout serialize.js, reducing the incidence of hidden equality failures in tests.