Template instances with undefined model value produce instances with zero nodes

Note: this removes template.clear() as it is no longer needed (t.model = undefined serves that purpose now).

R=arv
BUG=

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