Fix copyfrom/ compression by using a compressobj
Fix copyfrom/ compression by using a compressobj

Fix compression by using a stateful compressobj and flushing it when
there's no more data available.

CartoDB/carto-python,CartoDB/cartodb-python