Fix race in bufferedBytes access
Handle when client.Partitions returns empty slice

This can happen as documented in #49, when all the partitions for a slice
undergo leader election simultaneously.

In this case, return LeaderNotAvailable, which is true even if we haven't chosen
a partition yet :)
Refresh metadata if all partitions are in election

Otherwise the producer gets stuck with a stale cache
Merge pull request #101 from Shopify/handle-zero-partitions

Handle when client.Partitions returns empty slice
Add an example of an async producer

Closes #104
Fixups to ProducerConfig

Closes #87
Closes #99
Merge pull request #106 from Shopify/producer-config-fixes

Fixups to ProducerConfig
Merge pull request #105 from Shopify/async-producer-example

Add an example of an async producer
Add google group link to README
Merge pull request #108 from Shopify/google-group

Add google group link to README
Add go 1.3 to travis configuration
Fix Travis init script
Simple functional test
Merge pull request #107 from Shopify/functional_test

Add functional test
Only run functional tests when Kafka is available. Require that when ENV[CI] is set.
Code review fixes
Merge pull request #110 from Shopify/make_functional_tests_optional

Only run functional tests when Kafka is available
Merge pull request #100 from dolzenko/fix-race

Fix race in bufferedBytes access
Improve documentation and defaults for consumer configuration
Merge pull request #112 from Shopify/better-consumer-config

Improve documentation and defaults for consumer configuration