Replace Map<String,String[]> with serializable Metadata

Having a wrapper for Metadata would be a bit more elegant than moving the Map<String,String[]> around.
This initial implementation adds Metadata and removes the KeyValues utility. Later on we can replace all occurrences of Map<String,String[]> and systematically use Metadata instead.
I'd keep the same logic regardless of whether you want the first valur or all of them