add batch writes in cache.

In this PR, batch writes is added to the in memory cache as mentioned in #182
I've exported a parameter named bufferDuration so that the caller should specify this duration. Changed storagedriver.go in the main package accordingly.