Handle multiple templates in TemplateParser

Before, TemplateParser truncated template lists to conform with the
GetExtendedMetadata hook expectation that returned arrays are flat.
This resulted in awkward code and errors since the business logic
to select the best template lived in another class.

TemplateParser now returns the data for all parsed templates;
it becomes the DataCollector's responsibility to select between
them and return something that conforms with the GetExtendedMetadata
interface.

Change-Id: I2f5b3531945ae822b54cc34417182bd6819ca4e3
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/636
Bug: 57259