(core) - Fix formatDocument mutating original document (#880)
* Fix formatDocument mutating original document
- Fix the formatDocument mutating parts of the original document
- Fix a formatted document from creating a different hash in createRequest
The latter works because `formatDocument` can be assumed to be called
by caches, like the cacheExchange, so they shouldn't ever alter the
resulting hash.
* Add changeset
* Update offlineExchange.test.ts
authored by