Templatize ol.Collection

replace #1332