Add 'codec' parameter to Producer

Adds a codec parameter to Producer.__init__ that lets the user choose
a compression codec to use for all messages sent by it.