Major refactor of metadata and HttpURI

This refactor strives to remove duplication between the Metadata class and the HttpURI class.

Both classes have been made mutable (as they partially were anyway so best not to pretend).

HttpURI now holds the decomposed strings rather than a single string with indexes. This allows it to be rebuilt after changing just parts of the URI. It is now a lot more similar to the
JVM URI class and we could consider replacing it (after checking peformance).

Next step is to refactor the Request class to prevent it duplicating these fields.