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.
Merge pull request #815 from redstar/llvm36

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