implement splice handling and DOM stability for template iteration

TBR=arv
BUG=

Review URL: https://codereview.appspot.com/7898043