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.