Support patching documents using the JSON Patch format

[#84489824]
Compress output if the browser supports it
Deflate incoming requests, if compressed

[#85099042]