loop_executor: Remove redundant exit variable
loop_executor: Extract both loop bodies into specialisations.

This reduces the amount of redundant code slightly.