Exit with an error on memory allocation failure. Fixes #458

Lua API docs say:
>LUA_ERRMEM: memory allocation error. For such errors, Lua does not call
the error handler function.
Would we want to embed the error code in this (like `128 + r`)?