Add changes related to the llvm::Metadata refactoring in LLVM 3.6.

In LLVM 3.6, the llvm::Metadata hierarchy is distinct from the llvm::Value hierarchy.
This refactoring causes several changes.