fix($compile): set the iteration state before linking

This issue was introduced in b87e5fc0920915991122ba5dac87b619847b3568.
The state for each row has to be set up *before* linking.

The cloneFn (the function passed into $transclude) is called *before* actual linking and thus it is enough to update the state inside the cloneFn callback.