zstd: cherry-pick dictionary compression patch from upstream
zstd: cherry-pick dictionary compression patch from upstream

This is a cherry-pick of 0932de54bc0dbc6d29008b9e6087b88721ca8bb0
from the upstream repository. This is needed to avoid a deadlock
in our test suite.

indygreg/python-zstandard,indygreg/python-zstandard,indygreg/python-zstandard,indygreg/python-zstandard