add batch writes in cache.

In this PR, batch writes is added to the in memory cache as mentioned in #182
For Bigquery, I can make one call to the backend to flush all requests, instead of all batched rows one after another. Shall we change the storage interface for AddStats() to accept multiple stats. If a driver wants, it can iterate over them, or process them as a single batch.