Make MdTag immutable

Moves the parsing to `MdTag.apply()` and makes the `MdTag` class an immutable value type.