Refactor the producer, part 1
Refactor the producer, part 1

First stand-alone chunk extracted from #544. This introduces and uses a
produceSet structure which takes care of collecting messages, rejecting ones
which don't encode, and turning the rest into a `ProduceRequest`.

This has several knock-on effects:
- we no longer nil out array entries, so nil checks in several places (e.g.
  `returnErrors`) can be removed
- parseResponse gets re-indented since it loops over the partitions in the set
  via a callback now rather than a pair of nested loops
- groupAndFilter is much simpler, a lot of its logic now lives in the produceSet
- the flusher has to use the set to return errors/successes/retries, rather than
  `batch` which may now contain messages not in the eventual request
- keyCache and valueCache can be removed

kmiku7/sarama,scalingdata/sarama,VividCortex/sarama,vrischmann/sarama,VividCortex/sarama,DataDog/sarama,kmiku7/sarama,jepst/sarama,remerge/sarama,remerge/sarama,raisemarketplace/sarama,Shopify/sarama,vrischmann/sarama,HelixEducation/sarama,HelixEducation/sarama,mailgun/sarama,Shopify/sarama,raisemarketplace/sarama,scalingdata/sarama,jepst/sarama,DataDog/sarama,mailgun/sarama