refactor(ng-repeat): refactor fix for #1015

This is my proposal to fix #1015.

#1017 has already been merged but I think this set of change is easier to understand and more efficient.
See [the changes](https://github.com/vicb/angular.dart/compare/angular:f7115aa86da0cd7b37e68b2a652959e6572ffa14...vicb:0508-ngrepeat) vs the original (ie bugged) version.

Also if #774 eventually gets fixed, this version would be easier to deal with.

/cc @chirayuk