(core) - Fix formatDocument edge case and add caching (#1186)
* Fix case where __typename isn't added when it's aliased
* Add changeset
* Add caching to formatDocument to avoid duplicate work
* Golf code size of collectTypesFromResponse
* Update preserve custom property test
* Replace KeyedDocumentNode cache with Map
authored by