sampling: extract SampleWindow class

The existing AdvancedStatsFunction does actually
two different things: wraps a client-provided
callable, and implements a sliding window for samples.

This patch splits the two responsabilities.
Other than cleanup for the sake of clarity and testability,
future sampling refactoring patches will still
need to store samples and handle a sliding window;
but samples will be given instead of grabbed
(inversion of control, think the new libvirt bulk stats API)
so this also improve code reuse.

Change-Id: I48fe9e7f8ed3f5ec677d8f91a82cb70d0bdbb2e7
Signed-off-by: Francesco Romani <fromani@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/33783
Reviewed-by: Dan Kenigsberg <danken@redhat.com>