Use lambdas and pack expansion to reduce template instantiations in action_dispatch

2 jobs for improved-action-dispatch in 193 minutes and 16 seconds (queued for 5 seconds)