Kafka fixes and DStream.count fix for master

This pull request gets all the commits submitted by Sean Mc Namara on the streaming branch to master. This is same as the other pull request to the branch-0.7.