[mandatory-inline] Roll some more acceptable callee checks from runOnFunctionRecursively into getCalleeFunction. NFC.
I also did a little bit of cleaning up by converting a couple of
Type *F = dyn_cast<Type>(X).
To:
auto *F = dyn_cast<Type>(X).
rdar://31521023