Improve new-lua error handling.

This improves our handling of lua errors by
1. not crashing inside most of our recent triggers
2. writing the error details (and also print statements) to lua.log
3. halting the game on error with a (rudimentary) dialog.

The error dialog UI isn't great, but this will be difficult to improve without completely rewriting our info-panel implementation.  That is something that needs to be done, but I would prefer to leave that until after the pending release so that it can also include #2850.