extract method closeInstanceBindings for TemplateIterator

R=arv
BUG=

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