Replacing Lua’s math.random module with the Xorshift algorithm

I recently discovered that V8, the engine behind Node.js and Chrome, has been using xorshift128+ since 2014. Out of curiosity, I checked what the Lua VM uses, and to my surprise, it relies on the standard C library, which is extremely slow.