lua* improvements.

Fix some issues with luarocks looking for the wrong version and cleanup
the lua and lua51 formulae.

Closes #32354.
luarocks: update 2.2.0_1 bottle.

Closes #33067.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>