Functioning Vitter's R in Lua with no tests.
Fixing up docs (implementation is single-reservoir).