[Flink] Allow to customize PulsarProducer (#3955)

This is an improvement over #3894.

Because of how Flink instantiates functions, instead of passing a
custom `PulsarProducer` client we need to pass an object that is
serializable. The current implementation will default to always
call `createProducer()` because `producer` is `transient`, so it will
always be null when Flink creates new instances of the sink.
1 file changed