qv4: assign split edges to the correct loop group

edge splitting had a strange logic to assign the inserted statement to a loop,
which would go wrong for example for the statement just after the loop header.
I guess that was done to increase the likelihood that the goto removed from the
final instructions.
Given that we are talking about critical edges it is always possible to emit
them in a bad order, and I do not think that the old logic was really better
than simply always use the loop group of the target which is always correct.
It might be worthwhile to ensure that the block it is emitted just before the
target block, or improve the handling of empty gotos in the backend, but in this
patch we go for the simplest solution.
If one would notice worse code, either one of the provious improvements could be
done, or the old logic could be kept, changing just the if (container == 0) to
container = toBB->containingGroup();

Change-Id: I26a488e9e2cb2b692fa8187ee658fb4dd98bfa8b
Task-number: QTBUG-41766
Reviewed-by: Bernd Lamecker <bernd.lamecker@basyskom.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>