[WIP] Making AddStats() accept multiple parameters.

This PR follows up the discussion on #200. It changes the StorageDriver interface so that ``AddStats()`` will accept multiple stats making the underlying implementation possible to do batch writes.
SGTM @monnand
On Aug 29, 2014 1:02 PM, "monnand" <notifications@github.com> wrote:

> In storage/memory/memory.go:
>
> > @@ -153,19 +153,27 @@ type InMemoryStorage struct {
> >  	maxNumStats         int
> >  }
> >
> > -func (self *InMemoryStorage) AddStats(ref info.ContainerReference, stats *info.ContainerStats) error {
> > +func (self *InMemoryStorage) AddStats(pairs ...storage.ContainerRefStatsPair) error {
>
> I have same question. We could have two choices:
>
>    - AddStats(ref info.ContainerReference, stats ...*info.ContainerStats)
>    error: This introduced least change and compatible with old interface.
>    However, it could not maximize the benefit of batch writes: If there're
>    multiple containers, it has to be called several times.
>    - AddStats(pairs ...storage.ContainerRefStatsPair) error: This could
>    let the storage driver to one single write operation for all containers
>    with several stats. However, this requires more changes in the old code.
>
> Since we need to change the code anyway, I chose the second option.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/google/cadvisor/pull/202/files#r16917979>.
>