Change collection restore to event

This prevents unnecessary rerender when there is a nested view within the collection. When subclassing the restore method the children view are not restored prior to the remaining check done in the default restore method.
Handle functions passed to getTemplate