Formally handle errors when querying empty streams.

A zero value is returned instead of panicing, and the observation
count is exposed as a function now.

Explicit regression test has been added since the testing/quick
permutation generator does not appear to hit the zero observations
case.
Merge pull request #2 from matttproud/feature/api/untenable-query-errors

Formally handle errors when querying empty streams.