Now there are two main classes in Value hierarchy, which support metadata,
these are Instruction and GlobalObject. They implement different APIs for
metadata manipulation, which however substantially overlap. Implementation
of metadata support for new Value descendant would require creation of one
more API with almost the same functionality.
This change moves common metadata manipulation code into Value, so that
any descendant class could have metadata support.
No functional changes intended.