Add sample function to reduce the time it takes to operate on larger data sets
The QGIS approach is simple random sampling with replacement, which is a bit of an odd choice.
Simplest method for sampling without replacement is to do a fisher-yates shuffle (impl) and then a subset of the array. Not efficient when the array is much larger than the desired sample size, but it'll work.
Implement simple random sample. Fixes #55