Lua >= Lua52

See [this](https://github.com/Homebrew/homebrew/pull/29236) PR for more details. The previous thread for this PR is [here](https://github.com/Homebrew/homebrew/pull/31996). I was planning to rebase but I made a fairly awful mistake mid-rebasing and things went horribly wrong, so here’s to starting fresh and hopefully not screwing everything up.

CC: @mikemcquaid @daurnimator @sdegutis @nijikon
I'm not sure `with-completion` is needed. When `#define LUA_USE_MACOSX 1` is present, Lua links against readline, which on OS X is just a symlink to the built-in libedit library (see `man editline`).