Add getPassInfo() function to llvm::Pass

PassRegistry::getPass() is quite heavy since it involves taking a lock and
looking up the info in a hashtable.