Fix stats.variance() for empty and one-size sequences

Signed-off-by: Pekka Enberg <penberg@kernel.org>