Metadata.php: Enjoy traversing through the metadata with foreach
Metadata.php: Alias set() and get() to __set() and __get()
CiteTemplateGenerator.php: Clean up Metadata iteration
tests: Add MetadataTest