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.
You probably want to reformat better. Sorry for all these bad formatting