Fixing Luarocks

Closes #32354.

Primarily, this fixes Luarocks. It also adds a shared, simple test to Lua & Lua51, tidies up all formulae involved, and revisions all 4 lua-something formulae. 

Theoretically, this could work without revisioning anything other than Luarocks, but doing it this way is much cleaner, smoother and reduces the risk of a lingering lua screwing this update up for users.
Everything in [here](https://github.com/DomT4/homebrew/blob/run-print%28luaisloveluaislife%29/Library/Formula/luarocks.rb#L4-L23)? I'm a tad confused.

``` Luarocks ``` works fine with ``` Lua ``` (52) already. This PR helps meld that compatibility a chunk more with the more explicit directory pointing and the cleaner build process, but fundamentally ``` Lua ``` (52) and ``` Luarocks ``` are golden already.

The issue largely is that if we fix this with ``` luajit ``` because of ``` luajit ```'s internal dependency on ``` lua51 ``` then we need to fix it with ``` lua51 ``` as well. So if we remove ``` Lua51 ``` then ``` Luajit ``` needs to go as well, which I'm happy with, but up till this point we've supported multiple ``` Luas ``` with ``` Luarocks ``` and I didn't know if that desire still remained.

If the maintainers are happy to cut ``` Lua51 ``` and ``` Luajit ``` support from ``` Luarocks ```, count me as a big :+1: on doing so.