Redmine/6553: Fix implicit looping over multiple lists

Pull request for initial review of the changes to the code. Planning to add more test coverage to the acceptance test before merging.
Hmm, maybe I'm missing something here, but consider this:

<pre>
 "$(one) $(two)";
 "$(one) $(two)$(empty)"; # These two are equivalent

 "$(one) $(two)";
 "$(one) $(two) $(empty)"; # These two are NOT equivalent (note the space)
</pre>

Don't you agree that the two last ones do not insert the same line? Does the edit_line evaluator ignore spaces?