Provide memory allocator functions to zlib so that it is able to allocate memory and then deflate later.
Also, some minor error-handling things.
--
v2: opcservices: Check for memory allocation failure before deflating.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5845
Instead of accessing the surface with macdrv_get_surface_display_image.
--
v3: winemac: Remove now unnecessary cocoa window surface pointer.
winemac: Push window surface image updates to the main thread.
winemac: Create window surface CGImageRef on surface flush.
winemac: Create a provider for the surface and a HBITMAP wrapping it.
winemac: Remove unused macdrv_get_surface_display_image copy_data parameter.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5798