Support for encoding metadata types and instruction metadata

This allows declaration of some previously unusable intrinsics and annotation of all instructions.