Buffer stats in influxdb driver before writing to the Db. 

The buffering duration is configurable via a flag and is set to 60 seconds by default.
This new flag replaces exiting flag "history_duration" since they both are inter-dependent.
The storage driver test code has been re-factored a bit to help test the new buffering
feature and will be future proof.

Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
I'm worried about having the separate Unlocks() and how people handle the code in the future. WDYT of this flow:

```
seriesToWrite := []*influxdb.Series{}
func() {
  self.lock.Lock()
  defer self.lock.Unlock()

  ... do all the work ...
  if self.readyToFush() {
    ... more work and set seriesToWrite...
  }
}()

if len(seriesToWrite) > 0 {
  err := self.client.WriteSeries(seriesToWrite)
  ... error checking ...
}
```