Allow late assets for templates

Template classes can return a list assets to included at the end of the
asset output in the new getLateAssets($type) method.
getLateAssets