app.lua: Fix performance issue on with_restart()

with_restart has much better JIT behavior now that it takes a method
name instead of a closure to specify the code to run.
Merge pull request #255 from lukego/app_with_restart_opt

app.lua: Fix performance issue on with_restart()