salt.runners.lxc: move list_iter into its own function