Only need to set ret id once

Don't set it inside the for loop when it's the same all the time.
Respect ext_job_cache option on startup_states

It's especially useful to have a returner set when automatic
highstate is executed.
Set returner as specified in ext_job_cache instead of empty string.
Merge pull request #7561 from balboah/7540

Make custom returner work together with startup states