input read reservoir subsampler implemented

fixes #2

used reservoir sampling algorithm as explained here: http://gregable.com/2007/10/reservoir-sampling.html