Revert "Osc: Fix the number of samples requested by the application"

This reverts commit 67b4dfd338ab48f2b6898344cb86078a3eb5b96c.
Handle errors from iio_buffer_refill()

iio_buffer_refill() might return an error, e.g. if not data is available and it
times out. Handle this error correctly instead of displaying garbage data.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Handle oneshot devices correctly

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>