Refactor common parts of MDNode::getFunction() and assertLocalFunction() into getFunc...