KAFKA-1472; Add the compression ratio metrics in the new producer; patched by Dong Lin; reviewed by Guozhang Wang and Jun Rao